Created
May 25, 2011 22:02
-
-
Save schwern/992097 to your computer and use it in GitHub Desktop.
My git aliases
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] | |
st = status | |
ci = commit -v | |
cii = commit -v --interactive | |
cia = commit -v -a | |
addi = add --interactive | |
addchanged = add -u | |
br = branch | |
co = checkout | |
diffwords = diff --word-diff | |
rebranch = branch -f | |
svnpush = svn dcommit | |
svnpull = svn rebase | |
pick = cherry-pick -s | |
save = stash save | |
savepatch = stash save --patch | |
savescratch = stash save --keep-index | |
pop = stash pop | |
praise = blame -w | |
archeology = blame -w -C -n | |
whodoikill = blame -w -C -n | |
logfile = log --follow -C | |
plog = !git log --pretty=format:'%C(yellow)%h%Creset %s %Cblue%d%Creset' --graph --all | |
who = shortlog -sen -- | |
grep4d = !sh -c 'git log -p -S'$1' $2' - | |
# 2009-05-26 (merged-bed-bug) 6fe85ff regenerate rules Brad Bowman | |
logdate = log --format=format:'%ad %d %h %s %an%n' --date=short | |
brdate = !"sh -c 'for b in `git branch --no-merged` ; \ | |
do git logdate -1 -r $b --; done'" | |
up = !git stash && git pull origin master && git stash apply | |
stag = tag -s | |
retag = tag -f | |
bookmark = tag -a | |
unstage = reset HEAD | |
redo = reset --soft HEAD^ | |
clear = reset --hard HEAD | |
undo = reset --hard HEAD^ | |
repull = pull --rebase | |
hist = log --all --graph --pretty='[%C(cyan)%h%Creset]%C(bold cyan)%d%Creset %s' | |
mergefeature = merge --no-ff | |
export = !sh -c 'git checkout-index --prefix=$1 -a' - |
-C HEAD is not redundant. --amend alone will bring up your editor to edit the last commit message; -C HEAD will re-use the last commit message without prompting to change
it's great for "oops, I made a typo in the code or forgot to add a file": git add missing.txt && git fx
(fx = fixup)
Mine are at https://github.com/yanick/environment/blob/master/git/gitconfig Although there is nothing original in there -- it's all stolen from better, smarter peoples. (and yes, that means the examples given above will soon be assimilated as well :-) )
whodoikill is hilarious, even more so when archeology is the same thing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have some of that:
... but you some great ones. Thanks for sharing.