Skip to content

Instantly share code, notes, and snippets.

@nzakas nzakas/
Created Sep 11, 2015

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


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.

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
You can’t perform that action at this time.