Skip to content

Instantly share code, notes, and snippets.

@alexkrolick
Last active July 7, 2018 22:36
Show Gist options
  • Save alexkrolick/3e9104dd6439eca7666cf77976f4b3a5 to your computer and use it in GitHub Desktop.
Save alexkrolick/3e9104dd6439eca7666cf77976f4b3a5 to your computer and use it in GitHub Desktop.
Git aliases and tool config
[diff]
tool = vscode
indentHeuristic = true
algorithm = histogram
[difftool]
prompt = false
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$REMOTE\"" "\"$PWD/$MERGED\""
keepTemporaries = false
trustExitCode = false
keepBackup = false
[push]
default = simple
# install diff-highlight python lib to highlight word-level diffs:
# sudo easy_install diff-highlight
[pager]
show = diff-highlight | less
log = diff-highlight | less
diff = diff-highlight | less
[interactive]
diffFilter = diff-highlight
[alias]
last = log -1 HEAD
unstage = reset HEAD --
undo = reset --soft HEAD^
stash-all = stash save --include-untracked
ss = stash-all
a = add --patch
aa = add .
amend = commit --amend
c = commit
cm = commit -m
cnv = commit --no-verify -m
ca = commit -am
co = checkout
cb = checkout -b
b = checkout
bb = checkout -b
br = branch
bra = branch -a
brr = branch -r
f = fetch --prune
fo = fetch --prune origin
m = merge
ps = push
pl = pull
pr = pull --rebase
pf = push --force-with-lease
l = log
lp = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
s = status
d = diff
g = grep -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment