B<yourname>/B<some_descriptive_name>. Other committers should check
with a topic branch's creator before making any change to it.
-A remote topic branch can be created as follows. First, create and
-checkout a local branch. Do some work on it, then when you're ready, push
-the local branch to the remote repository and update the local branch
-to make it track.
-
- $ branch="$user/$topic"
- $ git checkout -b $branch
- ... do local edits, commits etc ...
- $ git push origin $branch:refs/heads/$branch
- $ git config branch.$branch.remote origin
- $ git config branch.$branch.merge refs/heads/$branch
-
-Note that there are many ways to create remote branches, this is just one
-relatively straightforward way that should work with most git versions and
-configurations.
+The simplest way to create a remote topic branch that works on all
+versions of git is to push the current head as a new branch on the
+remote, then check it out locally:
+
+ $ branch="$yourname/$some_descriptive_name"
+ $ git push origin HEAD:$branch
+ $ git checkout -b $branch origin/$branch
+
+Users of git 1.7 or newer can do it in a more obvious manner:
+
+ $ branch="$yourname/$some_descriptive_name"
+ $ git checkout -b $branch
+ $ git push origin -u $branch
If you are not the creator of B<yourname>/B<some_descriptive_name>, you
might sometimes find that the original author has edited the branch's