Last active
August 29, 2015 14:11
-
-
Save jtbandes/b06ad8e7a9206166908f to your computer and use it in GitHub Desktop.
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
[merge] | |
conflictstyle = diff3 | |
[alias] | |
b = branch | |
ci = commit | |
co = checkout | |
cp = cherry-pick | |
di = diff | |
ds = diff --stat | |
f = fetch -pt | |
ff = pull --ff-only | |
m = merge | |
pr = pull-request -o | |
st = status | |
sub = submodule | |
sup = submodule update --recursive | |
which = !sh -c 'git branch -a --contains $@ && git tag --contains $@' -- | |
cfg = config -e --global | |
l = log --all --graph --color --decorate --oneline | |
ll = log --all --graph --color --decorate | |
s = stash | |
x = !sh -c 'gitx' | |
sshow = stash show --format=medium | |
conflict = !sh -c 'git diff --name-only --diff-filter=U -z | xargs -0 $EDITOR' | |
resolve = !sh -c 'git diff --name-only --diff-filter=U -z | xargs -0 git add -v --' | |
halp = help | |
rebranch = !sh -c "'if [ $(git rev-parse --abbrev-ref head) = master ]; then git checkout -b \"$@\"; git branch -f master origin/master; else echo error: not on master; false; fi'" -- | |
remaster = branch master origin/master | |
squash-branch = !sh -c 'git rebase -i `git merge-base head master`' | |
cp-branch = !sh -c 'git b CP_BR_TEMP $0 && git co -B $0 && git cp `git merge-base head CP_BR_TEMP`..CP_BR_TEMP && git b -D CP_BR_TEMP' | |
cp-branch-abort = !git reset --hard CP_BR_TEMP && git b -d CP_BR_TEMP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment