The Web and all that Jazz: Git remote branch notes

A while back, I was wondering how to make a remote branch from a local branch because all the solutions I knew of created a remote branch from master, using origin

After trying out a couple things, I realized I could just create the remote branch from master, and just rebase the damn thing:

git push origin {new_remote_branch}
git branch --track {new_remote_branch} origin/{new_remote_branch}
git checkout {new_remote_branch}
git rebase {local_branch}
git push

Not super interesting, but enough and short enough to blog about. tip!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s