Hey,
With a local mirror setup, you should create a development branch. We've gone for "masterXX" where XX is short for the code name. E.g. JB = Jelly bean, LP = Lollipop, MM=Marshmellow and so on.
Then update your manifest, and set this as the default branch:
<default revision="masterLP"
remote="REMOTE_NAME"
sync-j="4" />
(Remote name should be set based on the <remote> XML tag, just above. Probably origin or aosp for you. We have it to be our company name).
With that setup, you should be able to do changes to AOSP.
To update your git servers AOSP sources, ssh to the git server and run "repo sync" (see the "Using a Local Mirror" link again ). We have a Jenkins job that does this periodically.
When we want to upgrade our branch to the latest AOSP release, we create a new branch, merge in AOSP changes, builds it, tests it, and then eventually merge it into our master branch. E.g:
repo forall -c "git checkout -b upgrade_5.1.1_r30"
repo forall -p -c "git merge --no-ff --no-edit android-5.1.1_r30"
# this will probably have some merge conflicts, address those...
# with that done, either push it to your gerrit instance for review, or:
repo forall -p -c "git push origin HEAD:masterLP && git branch -D android-5.1.1_r30"
Regards,
Arne-Christian.