Skip to content

Instantly share code, notes, and snippets.

@emabrey
Last active March 21, 2019 08:56
Show Gist options
  • Save emabrey/ea38b89f2690e79ce4cfb120b31ed6d2 to your computer and use it in GitHub Desktop.
Save emabrey/ea38b89f2690e79ce4cfb120b31ed6d2 to your computer and use it in GitHub Desktop.
Global .gitconfig
[add]
ignoreErrors = true
[alias]
add-maven-wrapper = "!mvn -N io.takari:maven:wrapper -B -Dmaven=\\$\\{versions.maven.ideal\\} -Denforcer.skip=true"
aliases = config --get-regexp '^(alias){1}([.]){1}(.)+'
changes = !f(){ git pull origin --prune "$@" && git submodule update --init; }; f
chmod = update-index --add --chmod=$1
clearcreds = credential-cache exit
ignored = ls-files --other --ignored --exclude-standard
issues = !sh -c 'git log --oneline $@ | egrep -o [A-Z]+-[0-9]+ | sort | uniq' -
lasttag = describe --tags --abbrev=0
loglist = log --graph --decorate --pretty=oneline --abbrev-commit
migrate = !f(){ C=$(git symbolic-ref --short HEAD); git checkout -b $1 && git branch --force $C ${3-'$C@{u}'} && git rebase --onto ${2-master} $C; }; f
refdiff = !f() { git diff $1^..$1; }; f
sigcommit = commit --signoff
unadd = reset HEAD
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
whois = !sh -c 'git log -i --pretty="format:%an <%ae>" --author="$1" | sort -u' -
[am]
keepCR = true #I think this is correct?
messageId = true
threeWay = true
[apply]
ignoreWhitespace = false
whitespace = error-all
[blame]
date = iso8601-strict
[branch]
autoSetupMerge = always
autoSetupRebase = never
#color slot= [attributes] foreground [background]
# color = 0 - 256(ANSI); #000000 (24bit Hex); black, red, green, yellow, blue, magenta, cyan, white; normal
# attributes: bold dim italic ul blink reverse strike
[color]
branch = auto
decorate = auto
diff = auto
grep = auto
interactive = auto
pager = true
showBranch = auto
status = auto
ui = auto
[color "status"]
added = bold dim green
branch = dim ul yellow
changed = bold italic red
localBranch = dim ul green
noBranch = bold reverse blink red black
remoteBranch = dim ul red
untracked = bold reverse magenta white
[color "diff"]
commit = yellow bold
frag = magenta bold
meta = yellow
new = green bold
old = red bold
whitespace = red reverse
[column]
branch = auto, row, dense
clean = auto, column, nodense
status = auto, column, dense
tag = auto,column,nodense
ui = auto,column,nodense
[commit]
gpgSign = true
[core]
abbrev = auto
autoCRLF = input
bigFileThreshold = 256m
compression = 7
createObject = link
deltaBaseCacheLimit = 128m
#this editor setting should be added to the system config not this global config
#because it needs OS specific customization
#
#editor = "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
eol = native
logAllRefUpdates = always
looseCompression = 5
pager = "less --quit-if-one-screen --no-init --tabs=0,4 --quit-at-eof --Raw-control-chars --Search-skip-screen --"
saferCRLF = true
splitIndex = true
symlinks = true
whitespace = blank-at-eol,blank-at-eof,space-before-tab
[credential]
#These should be added to the system specific configuration as well
#helper = "" #Helpers are tested in order and the first success used until setting as an empty string
#helper = "keepasshttp" #Cross-platform Keepass helper via https://github.com/z00nx/git-credential-keepasshttp
#helper = "manager" #Windows specific
#helper = "gnome-keyring" #Linux specific
#helper = "osxkeychain" #OSX specific helper
#helper = "cache --timeout=300" #Default cross-platform helper which stores via RAM for 5 mins
[diff]
algorithm = histogram
colorMoved = dimmed_zebra
compactionHeuristic = true
context = 8
dirstat = lines,0,noncumulative
indentHeuristic = true
interHunkContext = 2
mnemonicPrefix = true
renameLimit = 2500
renames = copies
submodule = diff
tool = meld
wsErrorHighlight = old,new,context
[difftool]
prompt = false
[fetch]
fsckObjects = true
recurseSubmodules = on-demand
[format]
coverLetter = auto
pretty = simple
useAutoBase = true
[gc]
aggressiveDepth = 100
aggressiveWindow = 300
auto = 1500
autoPackLimit = 20
logExpiry = 6.hours
packRefs = notbare
pruneExpire = 2.weeks.ago
reflogExpire = 1.month.ago
reflogExpireUnreachable = 2.weeks.ago
rerereResolved = 6.months.ago
rerereUnresolved = 1.month.ago
worktreePruneExpire = 1.month.ago
[grep]
fallbackToNoIndex = true
lineNumber = true
patternType = perl
[gui]
diffContext = 8
encoding = utf-8
[help]
format = web
[http]
maxRequests=10
minSessions=2
sslCipherList = ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-SHA \
ECDHE-ECDSA-AES256-SHA ECDHE-ECDSA-AES128-SHA256 ECDHE-ECDSA-AES256-SHA384 ECDHE-RSA-AES128-GCM-SHA256 \
ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-SHA ECDHE-RSA-AES256-SHA ECDHE-RSA-AES128-SHA256 \
ECDHE-RSA-AES256-SHA384 DHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES128-SHA \
DHE-RSA-AES256-SHA DHE-RSA-AES128-SHA256 DHE-RSA-AES256-SHA256
sslVerify = true
sslVersion = tlsv1.2
[i18n]
commitEncoding = UTF-8
[index]
#note that version 4 is not supported by JGit
#the index can shrink 30% by upgrading however so it is worth it
version = 4
[log]
date = iso8601-strict
follow = true
showSignature = true
[merge]
conflictStyle = diff3
ff = false
tool = meld
[mergetool]
prompt = false
keepBackup = false
writeToTemp = true
[notes]
mergeStrategy = union
rewriteMode = overwrite
rewriteRef = refs/notes/commits
[notes "rewrite"]
amend = true
rebase = true
[pack]
depth = 100
threads = 0 #autodetect cpu count
writeBitmapHashCache = true
[pretty]
simple = tformat: %C(auto,yellow)%>>(7,mtrunc)%h %C(auto,magenta)%><(2)%G? %C(auto,red)%><(22,trunc)%cr %C(auto,green)%><(15,mtrunc)%cN %C(auto,reset) %<(50,trunc)%s %C(auto, cyan) %>>(10,ltrunc) %gd
[push]
default = simple
gpgSign = if-asked
recurseSubmodules = check
[rebase]
autoSquash = true
autoStash = false
missingCommitsCheck = error
stat = true
[recieve]
advertiseAtomic = true
advertisePushOptions = true
# Auto deny: require explicit opt-in for deletes
denyDeleteCurrent = true
denyDeletes = true
updateServerInfo = true
[repack]
writeBitmaps = true
[rerere]
autoUpdate = false
enabled = true
[sendemail]
confirm = always
smtpEncryption = tls
suppressCC = self
[status]
branch = true
short = true
showStash = true
showUntrackedFiles = all
submoduleSummary = true
[submodule]
fetchJobs = 0
[tag]
forceSignAnnotated = true
sort = -version:refname
[tar]
umask = 0002
[tar "tar.gz"]
command = gzip --stdout --no-name
remote = true
[tar "tgz"]
command = gzip --stdout --no-name
remote = true
[tar "tar.xz"]
command = xz --stdout
remote = true
[tar "txz"]
command = xz --stdout
remote = true
[transfer]
fsckObjects = true
unpackLimit = 10
[uploadpack]
keepAlive = 2
[user]
email = 3370875+emabrey@users.noreply.github.com
name = Emily Mabrey
signingKey = 6F4EF47256A1B7DC
useConfigOnly = true
[versionsort]
suffix = -SNAPSHOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment