Last active
August 29, 2015 14:16
-
-
Save benjaminwy/d6c0eca5ed5316375ed9 to your computer and use it in GitHub Desktop.
Useful git aliases
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
| [user] | |
| name = Your Name | |
| email = your.email@address.com | |
| [alias] | |
| # List aliases | |
| la = "!git config -l | grep alias | cut -c 7-" | |
| # Shorthand | |
| c = commit -m | |
| a = add -A | |
| s = status | |
| cob = checkout -b | |
| ac = !git add -A && git commit -m | |
| # List commits in short form with colors and branch/tag annotations | |
| ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate | |
| # List commits showing changed files | |
| ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat | |
| # List one-line commits showing dates | |
| lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
| # List one-line commits showing relative dates | |
| ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative | |
| # Short git log | |
| le = log --oneline --decorate | |
| # Show modified files in last commit | |
| dl = "!git ll -1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment