Snippets

Craig Phillips Standard Git Config File

Updated by Craig Phillips

File .gitconfig Modified

  • Ignore whitespace
  • Hide word diff
 	editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession
 	preloadindex = true
     fscache = true
+	longpaths = true
 [diff]
 	tool = bc4
 [difftool "bc4"]
Updated by Craig Phillips

File .gitconfig Modified

  • Ignore whitespace
  • Hide word diff
 	preloadindex = true
     fscache = true
 [diff]
-	tool = bc3
-[difftool "bc3"]
-	cmd = \"c:/Program Files (x86)/Beyond Compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" -lro -lefttitle='remote' -righttitle='local' -solo -expandall
+	tool = bc4
+[difftool "bc4"]
+	cmd = \"c:/Program Files/Beyond Compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" -lro -lefttitle='remote' -righttitle='local' -solo -expandall
 [difftool]
 	prompt = false
 [merge]
-	tool = bc3
-[mergetool "bc3"]
-	cmd = \"c:/Program Files (x86)/Beyond Compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" -ro -lefttitle='local' -centertitle='base' -righttitle='other' -automerge -reviewconflicts -solo
+	tool = bc4
+[mergetool "bc4"]
+	cmd = \"c:/Program Files/Beyond Compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" -ro -lefttitle='local' -centertitle='base' -righttitle='other' -automerge -reviewconflicts -solo
 	trustExitCode = true
 [alias]
 	st = status
 	keepBackup = false
 	prompt = false
 [difftool "sourcetree"]
-	cmd = 'C:/Program Files (x86)/Beyond Compare 3/BComp.exe' \"$LOCAL\" \"$REMOTE\"
+	cmd = 'C:/Program Files/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\"
 [mergetool "sourcetree"]
-	cmd = 'C:/Program Files (x86)/Beyond Compare 3/BComp.exe' \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
+	cmd = 'C:/Program Files/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
 	trustExitCode = true
 [push]
 	default = simple
Updated by Craig Phillips

File .gitconfig Modified

  • Ignore whitespace
  • Hide word diff
 [diff]
 	tool = bc3
 [difftool "bc3"]
-	cmd = \"c:/Program Files (x86)/Beyond Compare 3/BCompare.exe\" \"$LOCAL\" \"$REMOTE\" -lro -lefttitle='remote' -righttitle='local' -solo -expandall
+	cmd = \"c:/Program Files (x86)/Beyond Compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" -lro -lefttitle='remote' -righttitle='local' -solo -expandall
 [difftool]
 	prompt = false
 [merge]
Updated by Craig Phillips

File .gitconfig Modified

  • Ignore whitespace
  • Hide word diff
 	email = [INSERT YOUR EMAIL ADDRESS HERE]
 [core]
 	autocrlf = true
-	excludesfile = "C:/Users/craig/gitignore_global.txt"
-	;excludesfile = "C:/Users/craig/gitignore_global.txt"
-	editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession           ; For 64-bit Notepad++
-	;editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession    ; For 32-bit Notepad++
+	excludesfile = D:\\Documents\\gitignore_global.txt
+	;excludesfile = "D:/Documents/gitignore_global.txt"
+	;editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession
+	editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession
 	preloadindex = true
     fscache = true
 [diff]
 	br = branch
 	dt = difftool --dir-diff
 	vd = difftool --dir-diff
-	lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
-	lg2 = log --graph --abbrev-commit --decorate  --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
+	lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an <%ae>%C(reset)%C(bold yellow)%d%C(reset)' --all
+	lg2 = log --graph --abbrev-commit --decorate  --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an <%ae>%C(reset)' --all
 	lg = !"git lg1"
 	maint = fetch -p
 	nm = "!f() { git branch --no-merged $1; }; f"
 	all = "!f() { ls | xargs -I{} git -C {} $1; }; f"
 	inc = log ..@{u}
 	out = log @{u}..
+	gc-all = "!f() { git reflog expire --expire-unreachable=now --all; git gc --prune=now; }; f"
 	aliases = config --get-regexp alias
 [mergetool]
 	keepBackup = false
 [gc]
     auto = 256
 [gpg]
-	program = C:\\Utils\\GnuPG\\bin\\gpg.exe
+	program = C:\\Utils\\GnuPG\\bin\\gpg.exe
Updated by Craig Phillips

File .gitconfig Modified

  • Ignore whitespace
  • Hide word diff
 	email = [INSERT YOUR EMAIL ADDRESS HERE]
 [core]
 	autocrlf = true
-#  Ensure to change the path and filename below	!!!!!
 	excludesfile = "C:/Users/craig/gitignore_global.txt"
-#  Ensure to change the path and filenames below	!!!!!
-	editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession
+	;excludesfile = "C:/Users/craig/gitignore_global.txt"
+	editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession           ; For 64-bit Notepad++
+	;editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession    ; For 32-bit Notepad++
 	preloadindex = true
     fscache = true
 [diff]
 	tool = bc3
 [difftool "bc3"]
-#  Ensure to change the path and filenames below	!!!!!
 	cmd = \"c:/Program Files (x86)/Beyond Compare 3/BCompare.exe\" \"$LOCAL\" \"$REMOTE\" -lro -lefttitle='remote' -righttitle='local' -solo -expandall
 [difftool]
 	prompt = false
 [merge]
 	tool = bc3
 [mergetool "bc3"]
-#  Ensure to change the path and filenames below	!!!!!
 	cmd = \"c:/Program Files (x86)/Beyond Compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" -ro -lefttitle='local' -centertitle='base' -righttitle='other' -automerge -reviewconflicts -solo
 	trustExitCode = true
 [alias]
 	st = status
+	br = branch
 	dt = difftool --dir-diff
 	vd = difftool --dir-diff
 	lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
 	keepBackup = false
 	prompt = false
 [difftool "sourcetree"]
-#  Ensure to change the path and filenames below	!!!!!
 	cmd = 'C:/Program Files (x86)/Beyond Compare 3/BComp.exe' \"$LOCAL\" \"$REMOTE\"
 [mergetool "sourcetree"]
-#  Ensure to change the path and filenames below	!!!!!
 	cmd = 'C:/Program Files (x86)/Beyond Compare 3/BComp.exe' \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
 	trustExitCode = true
 [push]
 	default = simple
 [gc]
     auto = 256
+[gpg]
+	program = C:\\Utils\\GnuPG\\bin\\gpg.exe
  1. 1
  2. 2
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.