Skip to content

Instantly share code, notes, and snippets.

@willbowling
Created June 21, 2018 13:44
Show Gist options
  • Save willbowling/44ce365ec6e8ef409f6f21bd88c8dc57 to your computer and use it in GitHub Desktop.
Save willbowling/44ce365ec6e8ef409f6f21bd88c8dc57 to your computer and use it in GitHub Desktop.
Git Config - June 2018
[url "https://"]
insteadOf = git://
[credential]
helper = osxkeychain
[user]
name = Will Bowling
email = will.bowling@weather.com
[core]
excludesfile = /Users/wlingjr/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[push]
default = simple
[alias]
#pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
last = cat-file commit HEAD
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
lsd = log --graph --decorate --pretty=oneline --abbrev-commit --all
exclude = !sh -c 'echo "$1" >> .git/info/exclude' -
# http://lukas.zapletalovi.com/2012/07/my-git-aliases-again.html
pu = pull
pur = pull --rebase
pod = pull origin develop
cam = commit -am
ca = commit -a
cm = commit -m
ci = commit
co = checkout
st = status
br = branch -v
unstage = reset HEAD --
find = !sh -c 'git ls-tree -r --name-only HEAD | grep --color $1' -
cleanup = !git branch --merged master | grep -v 'master$' | xargs git branch -d
cleanup-dev = !git branch --merged develop | grep -v 'develop$' | xargs git branch -d
k = !gitk
g = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
h = !git --no-pager log origin/master..HEAD --abbrev-commit --pretty=oneline
pom = !sh -c 'git h && echo Ready to push? ENTER && read && git push origin master' -
pomt = !sh -c 'git h && echo Ready to push? ENTER && read && git push origin master && git push origin master --tags' -
purm = !sh -c 'test "$#" = 1 && git h && git checkout master && git pull && git checkout \"$1\" && git rebase master && exit 0 || echo \"usage: git purm <branch>\" >&2 && exit 1' -
rem = !sh -c 'test "$#" = 1 && git h && git checkout master && git pull && git checkout \"$1\" && git rebase master && git checkout master && git merge \"$1\" && echo Done and ready to do: git pom && exit 0 || echo \"usage: git rem <branch>\" >&2 && exit 1' -
rpom = !git pull --rebase && git pom
v = !gvim $*
lt = !git describe $(git rev-list --tags --max-count=1)
mus = !sh -c 'git checkout master && git fetch upstream && git merge upstream/master && git push origin master --tags' -
lg = log --graph --pretty=tformat:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %an' --abbrev-commit --date=relative
cfiles = show --pretty=\"format:\" --name-only
[color]
ui = true
[format]
pretty = oneline
[help]
autorcorrect = 1
[gc]
auto = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment