PreshBlog

Creating and pushing new remote git branch

by on Apr.15, 2011, under Programming

A note for my own reference, as I always forget how to create a remote branch then work with it later:

Create a new remote branch topic/add_awesomeness with, e.g.:


git push origin :origin:refs/heads/topic/add_awesomeness

Create a new local branch to track it:


git checkout --track -b add_awesomeness origin/topic/add_awesomeness

The unintuitive way to delete a remote branch is:


 git push origin :heads/topic/doc_cleanup

(There must be a better way than that…)


Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!