Skip to content

Instantly share code, notes, and snippets.

@nzakas nzakas/alias.md
Created Sep 11, 2015

Embed
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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.