Skip to content

Instantly share code, notes, and snippets.

@awilmore
Created October 8, 2018 03:32
Show Gist options
  • Save awilmore/e09b97a8d24d6132cf84b3b6630e5064 to your computer and use it in GitHub Desktop.
Save awilmore/e09b97a8d24d6132cf84b3b6630e5064 to your computer and use it in GitHub Desktop.
Personal ~/.gitconfig
[user]
name = abc
email = [email protected]
[core]
excludesfile = ~/.gitignore_global
[color]
ui = auto
[diff]
tool = vimdiff
renameLimit = 1000
[difftool]
prompt = false
[difftool "mvim"]
cmd = mvim -f -d \"$LOCAL\" \"$REMOTE\"
[difftool "gvim"]
cmd = gvim -f -d \"$LOCAL\" \"$REMOTE\"
[difftool "ksdiff"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool "kdiff3"]
cmd = /Applications/kdiff3.app/Contents/MacOS/kdiff3 \"$LOCAL\" \"$REMOTE\"
trustExitCode = false
[difftool "smartsync"]
cmd = /Applications/SmartSynchronize.app/Contents/MacOS/SmartSynchronize \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bc4
[mergetool]
prompt = false
keepBackup = false
[mergetool "bc4"]
cmd = /usr/local/bin/bcomp \"$LOCAL\" \"$REMOTE\" \"$BASE\" -mergeoutput=\"$MERGED\" trustExitCode = true
[mergetool "delta"]
cmd = /Applications/DeltaWalker.app/Contents/MacOS/bzr-git-merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" -merged=\"$MERGED\"
trustExitCode = false
[mergetool "ksdiff"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustexitcode = true
[mergetool "kdiff3"]
cmd = /Applications/kdiff3.app/Contents/MacOS/kdiff3
trustExitCode = false
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[alias]
d = difftool
dm = difftool -t mvim
dw = difftool -t delta
bc = difftool -t bc4
ks = difftool -t ksdiff
k = difftool -t kdiff3 --dir-diff
ss = difftool -t smartsync --dir-diff
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --graph --date=short
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat --graph
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative --graph
l = log --pretty=format:"%C(yellow)%h\\ %Cred%cd\\ %Cblue[%cn]\\ %Creset%s" --decorate --date=short --graph
lh = log --pretty=format:"%C(yellow)%h%Cred%<(70,trunc)%d\\ %Creset%<(30,trunc)%s" --decorate --date=short
lt = for-each-ref --format '%(color:yellow)%(align:20,left)%(refname:short)%(end)%(color:red)%(taggerdate:short)%(align:20,left)%(color:blue) [%(taggername)]%(end)%(color:reset)\"%(subject)\"' refs/tags --sort=taggerdate
pl = pull origin $(git_current_branch)
p = "!sh -c \"~/sbin/bash/gitp\""
f = fetch origin
fp = "!sh -c \"~/sbin/bash/gitp && git fetch origin\""
pf = "!sh -c \"~/sbin/bash/gitp && git fetch origin\""
pu = "!sh -c \"git push origin `git rev-parse --abbrev-ref HEAD`\""
s = status
t = log --all --decorate --oneline --graph
c = checkout -
[push]
default = simple
[url "[email protected]:"]
insteadOf = https://github.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment