Skip to content

Instantly share code, notes, and snippets.

@rktoomey
Created April 23, 2020 16:53
Show Gist options
  • Save rktoomey/941f27a3c019ae56eb922adcc2d1da76 to your computer and use it in GitHub Desktop.
Save rktoomey/941f27a3c019ae56eb922adcc2d1da76 to your computer and use it in GitHub Desktop.
Git configs
[user]
name = XXX
email = XXX
# signingkey = XXX
[github]
user = rktoomey
token = XXX
[url "git@github.com:"]
insteadOf = "https://github.com/"
[clean]
requireForce = false
[grep]
lineNumber = true
extendedRegexp = true
[log]
# relative, local, default, iso, rfc, and short
date = relative
# short, full
decorate = short
abbrev =
# this breaks git-svn.
abbrevCommit = true
[core]
# default length of shortened sha-1
#abbrev = 10
# quote unusual path characters
quotepath = true
sharedRepository = false
excludesfile = /Users/rosetoomey/.gitignore_global
attributesfile = ~/.gitattributes
# always LF in the repo
autocrlf = input
whitespace = tab-in-indent,trailing-space,space-before-tab,cr-at-eol
safecrlf = true
ignorecase = false
[apply]
# fix trailing whitespace when applying patches
whitespace = fix
[pretty]
# can have arbitrary pretty aliases
changelog = "format:* %H %s"
[alias]
remote-tags = ls-remote --tags origin
changes = diff --name-status -r
diffstat = diff --stat -r
log-not-master = log --branches --not master
symbolic-head = !CURRENT=$(git symbolic-ref HEAD) && echo $CURRENT
up = remote update -p
co = checkout
# rco == re-checkout, for helping ant figure out what to recompile. Oh, ant!
rco = !CURRENT=$(basename $(git symbolic-head)) && git checkout master && git checkout $CURRENT
st = status
lol = log --simplify-by-decoration --date-order --format='%Cred%h%Creset %s %Cgreen(%cr)%Creset' --abbrev=10 --abbrev-commit --graph --decorate --date=relative
lg = log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%an%Creset %m - %s %Cgreen(%cr)%Creset' --abbrev=10 --abbrev-commit --date=relative
undo-commit = reset --soft HEAD^
cram = push --force-with-lease
# delete-merged = branch --merged | grep -v "\*" | grep -v master | grep -v dev | xargs -n 1 git branch -d
[showbranch]
default = master HEAD
# colors: normal, black, red, green, yellow, blue, magenta, cyan and white.
# attributes: bold, dim, ul, blink and reverse
# <foreground> [attribute] [background] [attribute]
[color]
branch = auto
diff = auto
grep = auto
interactive = true
showbranch = auto
pager = true
sh = true
status = auto
ui = auto
[color "status"]
added = green
header = magenta
# updated
# changed
# untracked
# branch
# nobranch
[color "interactive"]
prompt = cyan
header = blue
help = green
error = red
[color "branch"]
current = yellow black
local = yellow
remote = magenta
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red
new = green bold
whitespace = white reverse
[color "grep"]
# context =
# filename =
# function =
# linenumber =
match = green reverse
selected = white
# separator
[color "status"]
added = yellow
changed = green
untracked = cyan reverse
branch = magenta
[rebase]
stat = true
[push]
default = current
[diff]
renamelimit = 1000
renames = copies
mnemonicprefix = true
[merge]
tool = diffmerge
stat = true
log = false
# I often prefer diff3, but each has their benefits
# conflictstyle = diff3
[mergetool "diffmerge"]
cmd = diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE
keepBackup = false
trustExitCode = true
[advice]
statusHints = false
[rerere]
enabled = true
autoupdate = true
[diff "stat"]
namewidth = 100
width = 100
[mergetool]
keepBackup = true
[credential]
# helper = cache
helper = osxkeychain
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
[branch]
autosetuprebase = always
[commit]
# gpgsign = true
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
# *.sql
*.sqlite
*.sqlite3
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Idea #
########
.idea
*.iml
src/build-aux/
src/m4/
.gradle/
gradle/
gradlew
gradlew.bat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment