Last active
June 26, 2019 12:51
-
-
Save arnaudjolly/7c6e4ac27423635a2f34e287d90869f0 to your computer and use it in GitHub Desktop.
git aliases I frequently use
This file contains 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
[alias] | |
br = branch | |
ci = commit | |
cl = clone | |
co = checkout | |
cp = cherry-pick | |
diff = diff --word-diff | |
dc = diff --cached | |
gr = grep -Ii | |
st = status -sb | |
;list aliases | |
la = "!git config -l | grep alias | cut -c 7-" | |
lsg = log --color --graph --pretty=format:'%C(yellow)%h %ad%C(red)%d %C(reset)%s %C(green)(%cr) %C(bold blue)[%an]%C(reset)' --abbrev-commit --date=short | |
top = log --color --graph --pretty=format:'%C(yellow)%h %ad%C(red)%d %C(reset)%s %C(green)(%cr) %C(bold blue)[%an]%C(reset)' --abbrev-commit --date=short --all -5 | |
ll = log --pretty=format:'%C(yellow)%h %ad%C(red)%d %C(reset)%s %C(green)(%cr) %C(bold blue)[%an]%C(reset)' --decorate --numstat | |
;find path pattern | |
f = "!git ls-files | grep -i" | |
;diff on specific revision | |
dr = "!f() { git diff \"$1\"^..\"$1\"; }; f" | |
;list content of revision | |
lc = "!f() { git ll \"$1\"^..\"$1\"; }; f" | |
lasttag = describe --tags --abbrev=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment