Created
May 10, 2013 16:09
-
-
Save viktorklang/5555429 to your computer and use it in GitHub Desktop.
A couple of nice additions to ZSH git plugin
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
*** /Users/viktorklang/.oh-my-zsh/plugins/git/git.plugin.zsh.old Fri May 10 18:07:33 2013 | |
--- /Users/viktorklang/.oh-my-zsh/plugins/git/git.plugin.zsh Fri May 10 18:05:49 2013 | |
*************** alias gcount='git shortlog -sn' | |
*** 14,19 **** | |
--- 14,21 ---- | |
alias gcp='git cherry-pick' | |
alias glg='git log --stat --max-count=5' | |
+ alias grm='git branch -D' | |
+ | |
# Git and svn mix | |
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' | |
*************** function current_branch() { | |
*** 30,32 **** | |
--- 32,36 ---- | |
alias ggpull='git pull origin $(current_branch)' | |
alias ggpush='git push origin $(current_branch)' | |
alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' | |
+ | |
+ alias ggrm='git push origin :$(current_branch)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
USE THIS AT YOUR OWN RISK! YMMV
Note that "ggrm" deletes the current branch from origin, just like ggpnp, ggpull and ggpush operates on current_branch
I usually use ggrm to remove a merged feature branch on origin before using grm locally to remove the branch.