Search code examples
repo

How to recover from forgetting `repo start`?


If I'm working on an Android change and I git commit but forget to repo start first, how do I recover from this so that I can repo upload my change?


Solution

  • To retroactively repo start new-branch-name:

    git checkout -b new-branch-name
    git branch --set-upstream-to aosp/master
    repo upload .