Created
June 21, 2013 16:31
-
-
Save rsrchboy/5832446 to your computer and use it in GitHub Desktop.
some of 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] | |
co = checkout | |
br = branch | |
st = status | |
df = diff | |
lg = log -p | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
ls = ls-files | |
wdiff = diff --color-words | |
wshow = show --color-words | |
fa = fetch --all | |
fap = fetch --all --prune | |
;wip = !sh -c 'git add -A && git commit -m "wip"' | |
;unwip = !sh -c 'git log -n 1 | grep wip >/dev/null && git reset HEAD~' | |
cp = cherry-pick | |
cpa = cherry-pick --abort | |
cpc = cherry-pick --continue | |
ca = commit --amend --no-edit | |
cae = commit --amend --edit | |
ri = rebase --interactive --autosquash | |
rbi = rebase --interactive | |
rba = rebase --abort | |
rbc = rebase --continue | |
rbs = rebase --skip | |
# quietly revert | |
rv = revert --no-edit | |
rve = revert --edit | |
; useful during merges | |
ours = checkout --ours | |
theirs = checkout --theirs | |
; get a commit message off a commit | |
cm = !sh -c "git show --raw | grep -v -e '^\\S' -e '^$' | sed -e 's/^ //'" | |
; see http://is.gd/gSeOj | |
fixup = !sh -c 'git commit -m \"fixup! $(git log -1 --format='\\''%s'\\'' $@ | sed -e '\\''s/^fixup! //'\\'')\"' - | |
squash = !sh -c 'git commit -m \"squash! $(git log -1 --format='\\''%s'\\'' $@ | sed -e '\\''s/^squash! //'\\'')\"' - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment