I created a local branch which I want to 'push' upstream. There is a similar question here on Stack Overflow on how to track a newly created remote branch.
However, my workflow is slightly different. First I want to create a local branch, and I will only push it upstream when I'm satisfied and want to share my branch.
- How would I do that? (my google searches did not seem to come up with anything).
- How would I tell my colleagues to pull it from the upstream repository?
UPDATE With Git 2.0 there is a simpler answer I have written below: http://stackoverflow.com/a/27185855/109305
git checkout origin/<branch-name> -b <branch-name>
which will create a new local branch called<branch-name
which tracks the remote branch of the same name and checks it out for you. – Brett Ryan Dec 6 '10 at 4:21