Skip to content

Instantly share code, notes, and snippets.

@samueljon
Created January 17, 2017 09:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueljon/82cf6640988170c75e48154539e88c00 to your computer and use it in GitHub Desktop.
Save samueljon/82cf6640988170c75e48154539e88c00 to your computer and use it in GitHub Desktop.
.gitconfig and .gitignore_global config examples
[core]
excludesfile = /Users/samueljon/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[user]
name = your name
email = your@email
signingkey = gpg-signing-key-if-you-got-one
[push]
default = simple
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
[color]
ui = true
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
;editor = subl -n -w
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lsign = log --pretty='format:%h %G? %aN %s'
lg = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
ls = ls-files
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[commit]
template = /Users/samueljon/.stCommitMsg
[credential]
helper = osxkeychain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment