Created
April 11, 2011 19:36
-
-
Save alikins/914144 to your computer and use it in GitHub Desktop.
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
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
[merge] | |
#tool = meld | |
tool = kdiff3 | |
#tool = diffuse | |
[alias] | |
# various pretty loggers | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative | |
lc = log ORIG_HEAD.. --stat --no-merges | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -" | |
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short | |
# ignore po files in "git log", sorry translators ;-< | |
slog = "!sh -c 'git log --no-merges $1 `ls | grep -v ^po`' -" | |
# typo | |
rbanch = branch | |
# commits not pushed to $1 | |
unpushed = cherry -v | |
# what tag contains the sha | |
whatrelease = name-rev --name-only | |
# what branch contains the shaw | |
contains = branch --contains | |
# log everything with $1 string in the diff | |
timegrep = log -S | |
# like above, but show the diff | |
diffgrep = log -p -S | |
# from https://gist.github.com/492227 | |
lost = !"git fsck | awk '/dangling commit/ {print $3}' | git show --format='SHA1: %C(yellow)%h%Creset %f' --stdin | awk '/SHA1/ {sub(\"SHA1: \", \"\"); print}'" | |
# show a log without the formating, occasionaly handy for c&p | |
rawlog = log --format=\"format:commit %H%nAuthor:%an%n%n%B%n\" | |
# show a list of branched sorted by time of last commit | |
brage = "!sh -c 'for C in $(git for-each-ref --sort=committerdate refs/heads --format=\"%(refname:short)\") ; do git show -s --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset $C\" \"$C\" ; done'" | |
# show a lot of tags sorted by when they were tagged | |
tagage = "!sh -c 'git for-each-ref --sort=taggerdate refs/tags --format=\"%(refname:short)\"'" |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment