Skip to content

Instantly share code, notes, and snippets.

@drosenstark
Last active Feb 8, 2018
Embed
What would you like to do?
Creates a local branch and pushes it up
#!/bin/bash
git checkout -b $1 && git push --set-upstream origin $1
@drosenstark
Copy link
Author

drosenstark commented Feb 8, 2018

If you put this in your path, you can call it with git rbranch XXX which will create branch XXX and a corresponding remote branch on your server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment