Skip to content

Instantly share code, notes, and snippets.

@vetras
Last active August 29, 2017 11:25
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 vetras/651b6d33bab3b43abb53 to your computer and use it in GitHub Desktop.
Save vetras/651b6d33bab3b43abb53 to your computer and use it in GitHub Desktop.
Template for git config files
#
# About line endings on windows:
# https://help.github.com/articles/dealing-with-line-endings/
#
[user]
name = John Doe
email = jdoe@example.com
[core]
autocrlf = true
[alias]
st = status
type = cat-file -t
dump = cat-file -p
hist = log --graph --pretty=format:'%C(yellow)%h%Creset - %C(bold blue)%an%Creset, %Cgreen%ar%Creset : %s' --abbrev-commit
find = log --graph --pretty=format:'%Cred%h %Cgreen%s' --all --grep
co = checkout
mydiff = difftool --dir-diff
alias-show = config --get-regexp alias
df = difftool --dir-diff
[push]
default = simple
[credential]
helper = wincred
#
# About diff on BC3
# git difftool file.txt -- lunch BC3 for diff on file. No file will lunch a BC3 window per file
# git difftool --dir-dif -- lunch BC3 for diff on all file as directory difference
# Dir-Dif only works with Bcompare.exe not Bcomp.exe as explained here:
# http://stackoverflow.com/questions/13310995/git-difftool-dir-diff-is-not-creating-temp-files-for-beyond-compare-3-to-use
#
[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]
cmd = 'C:/Program Files (x86)/Beyond Compare 3/BCompare.exe' \"$LOCAL\" \"$REMOTE\"
[difftool "bcomp"]
cmd = 'C:/Program Files (x86)/Beyond Compare 3/BComp.exe' \"$LOCAL\" \"$REMOTE\"
[mergetool "bcomp"]
cmd = 'C:/Program Files (x86)/Beyond Compare 3/BComp.exe' \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
trustExitCode = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment