27 February 2009

Helpful git aliases

I know you can go all out with git aliases. My favorite complex alias was "Use graphviz for display", documented here.

Here are ones that are useful for me:
[alias]
b = branch
co = checkout
ci = commit -a -s
st = status
stat = status
l = !git-log --pretty --date=local --abbrev=10 --abbrev-commit | sed -e 's/^\\(commit .*\\)...$/\\1/' | less

k = !gitk

patch-apply = am

patch-gen = format-patch


Alias "b":
Alias "co":
Alias "ci":
Alias "st":
Alias "stat":
- so I don't have to type as much

Alias "l":
- so that I can see real dates, not UTC
- so that the commit numbers are clickable for copy/paste

Alias "k":
- in case I type "git k" instead of "gitk"

Alias "patch-apply":
Alias "patch-gen":
- in case I can't remember what "am" and "format-patch" mean (common occurrence)

No comments:

Post a Comment