-
-
Save schwern/992097 to your computer and use it in GitHub Desktop.
[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' - |
@rjbs All useful stuff. -sb
is a handy option to status I wasn't aware of. I'll have to learn the shorthand though. It would be handy if there was something in between, one like the regular status but without the tutorial info.
Is the -C HEAD
redundant with --amend
?
I have some of that:
st = status -sb
ci = commit
co = checkout
revert-file = checkout HEAD --
staged = diff --cached
c = cat-file
human = name-rev --name-only --refs=refs/heads/*
... but you some great ones. Thanks for sharing.
-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.
Here are sone of mine: