2015-03-05

My first .gitconfig

I've recently started to use git on an everyday basis. Here's a couple of configurations that you may find useful, if you're just getting started:

[http]
 sslVerify = false
 postBuffer = 104857600
[push]
 default = simple
[user]
 name = James Bond
 email = bond.james@mi6.com
[color]
 ui = auto
[core]
 autocrlf = true
 excludesfile = C:\\Users\\james\\Documents\\gitignore_global.txt
[difftool "sourcetree"]
 cmd = 'C:/Program Files (x86)/WinMerge/WinMergeU.exe' -e -u -dl Mine -wr -dr Theirs $LOCAL $REMOTE $MERGED
[merge]
    tool = kdiff3
[mergetool "kdiff3"]
    cmd = 'C:/Program Files/KDiff3/kdiff3' $BASE $LOCAL $REMOTE -o $MERGED
[credential]
 helper = store

A couple of notes:

  • You set all of this in Git Bash using the git-config command.
  • Your ".gitconfig" file is usually found in the root of your user folder.
  • If you have pluralsight, you can check the Git Fundamentals course.