The repo start command creates a local branch based on the current upstream branch. Running repo upload will upload any local commits to the currently marked branch for viewing in the upstream branch hosted by the Gerrit server specified in the manifest file. If the type of click you want to do does not match this use case, you will have to use basic Git commands to click. You can still use repo start though (but you don't have to).
To create a manifest branch, repo start and repo upload not useful. Unlike other giants managed by Repo, you have to make all the changes to the Git manifest to the default branch, which Repo will check for you. Then use simple Git commands to make changes.
The following example shows how to create a new manifest branch named mybranch that is identical to the current upstream.
cd .repo/manifests git push origin default:refs/heads/mybranch
Now this in itself is not very useful, since the contents of your manifest are identical to the upstream branch - we just cloned that branch of the manifest, so you can run
repo init -u ssh://git.example.com/platform/manifest -b mybranch
The results will be identical to where you started:
repo init -u ssh://git.example.com/platform/manifest -b android-4.2.2_1
To make your mirror useful, you also need to split each Git specified in the manifest so that you get a branch on your server where you can make changes.
Theoretically, you can make changes to the same branches that you downloaded from your upstream, but this will create a mess the next time you try to synchronize with the upstream. Do not do that.
To create branches on the server, you can follow the same patterns as for the manifest:
cd build git push ssh://git.example.com/platform/build HEAD:refs/heads/mybranch
Note the use of HEAD, the symbolic name of the currently checked commit. Doing this for each Git is tedious, so use the repo forall command:
repo forall -c 'git push aosp HEAD:refs/heads/mybranch'
Note that the remote name is different from the Git manifest (IIRC).
See repo help forall for a list of environment variables available for commands executed by repo forall ( REPO_PROJECT , $REPO_LREV and $REPO_RREV are probably the most useful).
It is easy to drown with repo forall , so make it a good habit to add the echo command in advance so that you have commands that would be echoed to your terminal. If you are happy with the results, delete echo to run the commands for real.
You will now have the mybranch branch in all of your gits, including the manifest. It remains to change the manifest so that
repo init -u ssh://git.example.com/platform/manifest -b mybranch
will check mybranch in all gits.
cd .repo/manifests vi default.xml [ Change the default revision from refs/tags/android-4.2.2_1 or whatever it says to 'mybranch'. ] git commit -a -m 'Changed default revision to mybranch.' git push origin default:refs/heads/mybranch
Note that all gits do not necessarily use the default version (which you just changed to mybranch ). This probably refers to the android-4.2.2_1 manifest branch, but in other cases some gits will not use the default version, but instead override it with their own revision attribute. This is fine, but you will need to make additional manifest changes.