Snippets

Craig Phillips Standard Git Config File

Updated by Craig Phillips

File .gitconfig Modified

  • Ignore whitespace
  • Hide word diff
 [core]
 	autocrlf = true
 #  Ensure to change the path and filename below	!!!!!
-	excludesfile = D:\\Documents\\gitignore_global.txt
+	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
 	preloadindex = true
 	nm = "!f() { git branch --no-merged $1; }; f"
 	m = "!f() { git branch --merged $1; }; f"
 	whoami = var GIT_COMMITTER_IDENT
+	all = "!f() { ls | xargs -I{} git -C {} $1; }; f"
+	inc = log ..@{u}
+	out = log @{u}..
+	aliases = config --get-regexp alias
 [mergetool]
 	keepBackup = false
 	prompt = false
Created by Craig Phillips

File .gitconfig Added

  • Ignore whitespace
  • Hide word diff
+[user]
+	name = [INSERT YOUR NAME HERE]
+	email = [INSERT YOUR EMAIL ADDRESS HERE]
+[core]
+	autocrlf = true
+#  Ensure to change the path and filename below	!!!!!
+	excludesfile = D:\\Documents\\gitignore_global.txt
+#  Ensure to change the path and filenames below	!!!!!
+	editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession
+	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
+	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
+	lg = !"git lg1"
+	maint = fetch -p
+	nm = "!f() { git branch --no-merged $1; }; f"
+	m = "!f() { git branch --merged $1; }; f"
+	whoami = var GIT_COMMITTER_IDENT
+[mergetool]
+	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
  1. 1
  2. 2
HTTPS SSH

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