Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
Forked from VonC/.gitconfig
Last active May 2, 2020 18:20
Show Gist options
  • Save pythoninthegrass/5131fce1aa9fe06ee60f7767f7edc4b7 to your computer and use it in GitHub Desktop.
Save pythoninthegrass/5131fce1aa9fe06ee60f7767f7edc4b7 to your computer and use it in GitHub Desktop.
My global git config
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[user]
name = first last
email = address
[github]
user = username
token = 1..a
[credential]
helper = osxkeychain
[core]
; just making sure those eol's stay as they are
autocrlf = false
; see http://stackoverflow.com/a/22208863/6309 (Git/Bash is extremely slow in Windows 7 x64, until fix in msysgit 1.9.4)
fscache = true
[alias]
; see: https://github.com/taniarascia/mac
a = add
ca = commit -a
cam = commit -am
s = status
pom = push origin master
pog = push origin gh-pages
puom = pull origin master
puog = pull origin gh-pages
cob = checkout -b
; from http://www.jukie.net/bart/blog/pimping-out-git-log, with author displayed
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lgb = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --branches
lga = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all
lgba = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --branches --all
br=branch
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
aliases=config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | awk '{printf 033[1;31m 033[0m; =; print bin/bash;}'
lo=!sh -c 'git log $1' -
; from http://stackoverflow.com/a/11768870/6309
change-commits=!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter "if [[ $`echo $VAR` = \"$OLD\" ]]; then export $VAR=\"$NEW\"; fi" $@; }; f
[color]
; I want colors!
ui = always
;[http]
;sslcainfo = /home/username/.ssh/curl-ca-bundle.crt
[push]
default = simple
[rebase]
; see http://stackoverflow.com/a/30209750: git 2.6+ for git pull --rebase
autoStash = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment