Last active
June 6, 2019 19:11
-
-
Save ajn123/846c7ba7ba83bc81118b to your computer and use it in GitHub Desktop.
git config settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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