Skip to content

Instantly share code, notes, and snippets.

@dan-turner
Last active February 24, 2016 23:42
Show Gist options
  • Save dan-turner/5932428 to your computer and use it in GitHub Desktop.
Save dan-turner/5932428 to your computer and use it in GitHub Desktop.
Git Config
[core]
editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor
autocrlf = true
[credential]
helper = !\\\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\\\"
[user]
name = ####Your name here####
email = ####Your email here####
[merge]
tool = BeyondCompare4
[diff]
guitool = beyondcompare4
[mergetool "BeyondCompare4"]
path = C:/Program Files (x86)/Beyond Compare 4/bcomp.exe
cmd = \"C:/Program Files (x86)/Beyond Compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
[difftool "beyondcompare4"]
path = C:/Program Files (x86)/Beyond Compare 4/bcomp.exe
cmd = \"C:/Program Files (x86)/Beyond Compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
[alias]
st = status
ci = commit
br = branch
co = checkout
cod = checkout develop
com = checkout master
fe = fetch --all
bn = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`
rb = rebase
rbm = rebase master
rbu = !sh -c 'BRANCH_NAME=$(git bn) && git rb upstream/$BRANCH_NAME'
rbum = rebase upstream/master
pr = !sh -c 'BRANCH_NAME=$(git bn) && git co $0 && git fe && git merge --ff-only origin/$0 && git co $BRANCH_NAME && git rb $0'
prm = !git pr master
df = diff
who = shortlog -s --
hr = reset --hard
hro = !sh -c 'BRANCH_NAME=$(git bn) && git hr origin/$BRANCH_NAME'
hru = !sh -c 'BRANCH_NAME=$(git bn) && git hr upstream/$BRANCH_NAME'
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
q = !sh -c 'BRANCH_NAME=$(git bn) && git lg origin/$BRANCH_NAME..$BRANCH_NAME'
rbc = rebase --continue
mt = mergetool
unstage = reset HEAD $1
stage = add -A
ff = !sh -c 'BRANCH_NAME=$(git bn) && git merge --ff-only origin/$BRANCH_NAME'
nuke = !git clean -dxf && git checkout -f
configpr = !sh -c 'git config --local --add remote.upstream.fetch +refs/pull-requests/*:refs/remotes/upstream/pull-requests/*'
copr = !sh -c 'git fetch upstream pull-requests/$0/from && git checkout pull-requests/$0/from'
ex = !\"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" browse %CD% &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment