Skip to content

Instantly share code, notes, and snippets.

@ajn123
Last active June 6, 2019 19:11
Show Gist options
  • Select an option

  • Save ajn123/846c7ba7ba83bc81118b to your computer and use it in GitHub Desktop.

Select an option

Save ajn123/846c7ba7ba83bc81118b to your computer and use it in GitHub Desktop.
git config settings
git config --global user.name "John Doe" # Set name
git config --global user.email johndoe@example.com # set email
# Convenient log message display
git config --global alias.lg "log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative"
# Alias 'git a' to 'git add .'
git config --global alias.a "add ."
# set Git editor to emacs
git config --global core.editor emacs
# Set Git editor to sublime (you need quotes if your need to use a space)
git config --global core.editor "subl -w"
# View Git settings
git config --list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment