diff --git a/README.md b/README.md index d61035c..cbb5a26 100644 --- a/README.md +++ b/README.md @@ -373,3 +373,33 @@ README.md foo.txt ``` Voila! We got our removed file back. Git reflog is also useful when rebasing goes terribly wrong. + + +## I want to add aliases for some git commands + +On OS X and Linux, your git configuration file is stored in ```~/.gitconfig```. I've added some example aliases I use as shortcuts (and some of my common typos) in the ```[aliases]``` section as shown below: + +``` +[aliases] + a = add + amend = --amend + c = commit + ca = commit --amend + ci = commit -a + d = diff + dc = diff --changed + dif = diff + ds = diff --staged + f = fetch + loll = log --graph --decorate --pretty=oneline --abbrev-commit + m = merge + one = log --pretty=oneline + outstanding = rebase -i @{u} + psuh = push + puhs = push + pul = pull + s = status + wc = whatchanged + wip = rebase -i @{u} + zap = fetch -p +```