Created
October 2, 2013 01:45
-
-
Save lucascaton/6787943 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Usage: after_merge branch_name | |
branch="$1" | |
git checkout master | |
git pull --rebase | |
git remote prune origin | |
git branch -d $branch | |
clear | |
git branch -a |
Just created a git alias for that:
aftermerge = "!f() { git checkout master && git pull --rebase && git remote prune origin && git branch -d $1 ; }; f"
git aftermerge branch
Hey @bernardeli, we don't need pass a param (with the branch name) anymore:
aftermerge(){
branch=`git branch 2> /dev/null | grep \* | sed 's/* //'`
git checkout master
git pull --rebase
git remote prune origin
git branch -d $branch
clear
git branch -a
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this in
/usr/bin/after_merge
or in a similar place...