Created
June 27, 2012 16:43
-
-
Save devth/3005310 to your computer and use it in GitHub Desktop.
zshrc git aliases
This file contains 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
# Git Aliases | |
alias gitr='cd `git root`' | |
alias gpr='git pull --rebase && git --no-pager hist @{1}.. && echo' | |
alias gpom='git push origin master' | |
alias gs="git status" | |
alias gp="echo 'Pushing commits:' && git --no-pager hist HEAD@{upstream}.. && echo '' && git push" | |
alias gd="git diff" | |
alias gds="git diff --shortstat" | |
alias gl="git log" | |
alias gk="gitx" | |
alias gca="git commit -am " | |
alias today="git today" | |
alias gt="git today" | |
alias week="git week" | |
alias 2days="git hist --since=2.days.ago" | |
alias 3days="git hist --since=3.days.ago" | |
alias gcod="git checkout develop" | |
alias gcb='git branch | grep "^*" | sed -e "s/* //"' | |
alias gprp='gpr && gp' | |
alias gdr='git push origin :@{1}' | |
# Git with the hub gem | |
alias h="hub" | |
alias hb="hub browse" | |
alias hbc="hub browse -- commit/@$" | |
# Git functions | |
function gco(){ git checkout $@ } | |
function gka(){ gk --all $(git log -g --format="%h" -50) "$@"; } | |
function gcodate(){ git checkout "`git rev-list HEAD -n 1 --first-parent --before=$@`" && git show HEAD --stat } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!