Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Some simple scripts I use to manage open source branches

Usage:

To create a new branch that is up-to-date with the remote master:

$ ws 123

Creates the branch issue123

To finish up after the change has been merged:

$ wd 123

This switches to master, deletes the local branch issue123, and deletes the remote branch issue123.

workstart(){
git fetch origin
git checkout -b "issue$1" origin/master
}
workdone() {
git checkout master
git branch -D "issue$1"
git push origin :"issue$1"
}
alias ws=workstart
alias wd=workdone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment