Skip to content

Instantly share code, notes, and snippets.

@leoleozhu
Last active December 16, 2015 21:49
Show Gist options
  • Save leoleozhu/5502717 to your computer and use it in GitHub Desktop.
Save leoleozhu/5502717 to your computer and use it in GitHub Desktop.
My ~/.gitconfig file.Includes general configurations, alias and difftools
[user]
name = First Last
email = [email protected]
[core]
excludesfile = ~/.gitignore
autocrlf = true
[alias]
ci = commit
st = status
co = checkout
unstage = reset HEAD --
uncommit = reset HEAD~1 --soft
br = branch
ba = branch -a
m = merge
ma = merge --abort
mc = merge --continue
ms = merge --skip
# for svn
svn-id = svn find-rev
svn-pull = svn rebase
svn-push = svn push
# pretty logs, change sets, etc...
lg = log --graph --abbrev-commit --date=relative --pretty=format:'%Cred%h%Creset - %C(yellow)%an%Creset - %Cgreen(%cr)%Creset\t%w(72)%s'
showf = show --name-only --pretty="format:"
showfs = show --stat --pretty="format:"
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
[color]
ui = auto
[color "branch"]
current = yellow bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
[log]
abbrevCommit = true
[push]
default = simple
[diff]
tool = diffmerge
[difftool]
prompt = false
[difftool "diffmerge"]
cmd = "C:/PROGRA~1/SourceGear/Common/DiffMerge/sgdm.exe $LOCAL $REMOTE"
[merge]
tool = diffmerge
[mergetool]
prompt = false
[mergetool "diffmerge"]
trustExitCode = true
cmd = "C:/PROGRA~1/SourceGear/Common/DiffMerge/sgdm.exe --merge --result=$MERGED $LOCAL $BASE $REMOTE -title1=Local -title3=Remote"
keepBackup = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment