Global Git Config

The following is a nice start to your global git config. place the code in your $HOME/.gitconfig file. Be sure to replace the following tags with your actual information.

  • <>
  • <Your Name>
# This is Git's per-user configuration file.
        email = <>
        name = <Your Name>
        default = simple
        tool = opendiff
        co = checkout
        br = branch
        ci = commit
        st = status
        df = diff
        dt = difftool --dir-diff
        l = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(blue)- %an%Creset %C(green)%ar%Creset'
        permission-reset = !git diff -p -R | grep -E \"^(diff|(old|new) mode)\" | git apply
        editor = /usr/bin/vim
        excludesfile = /<YOUR HOME DIR>/.gitignore_global
[difftool "sourcetree"]
        cmd = opendiff \"$LOCAL\" \"$REMOTE\"
        path =
[mergetool "sourcetree"]
        cmd = /Applications/ \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
        trustExitCode = true
        template = /<YOUR HOME DIR>/.stCommitMsg
comments powered by Disqus