Last active
February 10, 2017 16:59
-
-
Save svnblame/75a99472fa0297ef56fcc733e1b33332 to your computer and use it in GitHub Desktop.
Gene Kelley's Git Aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st= status -sbv | |
ci = commit | |
cm = commit -am | |
br = branch | |
brv = branch -avv | |
co = checkout | |
df = diff | |
lp = log -p | |
who = shortlog -n -s --no-merges | |
undo = reset --hard | |
lf = log --pretty=fuller | |
lc = log ORIG_HEAD.. --stat --no-merges | |
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 | |
dryrun = "!f() { git remote update && git merge --no-ff --no-commit && git merge --abort }; f" | |
rup = "!f(){ git remote update && git fetch origin --prune; }; 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" | |
brv = branch -avv | |
brdelete = "!f(){ git branch -d ${1} && git push origin --delete ${1}; }; f" | |
prune = fetch origin --prune | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment