Skip to content

Instantly share code, notes, and snippets.

@svnblame
Last active May 18, 2018 20:14
Show Gist options
  • Save svnblame/d0e26c04302fa26b09caedd26b5627da to your computer and use it in GitHub Desktop.
Save svnblame/d0e26c04302fa26b09caedd26b5627da to your computer and use it in GitHub Desktop.
Gene Kelley's Git Config
# Gene Kelley's Git configuration file.
[core]
editor = vi
autocrlf = input
[user]
name = Gene Kelley
email = eugenek@guildmortgage.net
[push]
default = matching
[alias]
st = status -sbv
ci = commit
cm = commit -am
br = branch
brv = branch -vv
brav = branch -avv
co = checkout
df = diff
lp = log -p
who = shortlog -n -s --no-merges
undo = "!f(){ git reset --hard && git clean -df; }; f"
lf = log --pretty=fuller
ls = log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate
l = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
ll = log --pretty=format:\"%C(yellow)%h%Cred%d\\\\ %Creset%s%Cblue\\\\ [%cn]\" --decorate --numstat
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
cleanup = !git gc && git remote prune origin
fork = remote add -f
squash = merge --squash
rup = "!f(){ git remote update && git fetch origin --prune && git branch -vv; }; f"
rupbr = "!f(){ git remote update && git fetch origin --prune && git branch -avv; }; f"
ruphard = "!f(){ BRANCH=$(git symbolic-ref --short -q HEAD) \
&& git fetch origin --prune \
&& read -p \"Sure to reset HARD to origin/$BRANCH (Y) \" -n 1 -r RESPONSE \
&& echo \"\n\"\
&& if [[ $RESPONSE =~ ^[Yy]$ ]]; then git reset --hard origin/$BRANCH; fi \
&& git branch -avv;}; f"
brdelete = "!f(){ git branch -d ${1} && git push origin --delete ${1}; }; f"
prune = fetch origin --prune
stv = status -vv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment