Reputation: 16777
I have downloaded Android source code with repo, then I made some changes in frameworks/base/packages. Now when I trying to do repo sync, it gives me this error:
Syncing work tree: 60% (151/251) error: You have local changes to 'packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java'; cannot switch branches.
How to fix it and upgrade all the projects that have no changes?
Upvotes: 1
Views: 4303
Reputation: 1324268
As Jens comments, stashing is a good option here (for uncommitted changed.
It allows to save your local modification, git pull
and git stash apply
said modifications back.
See for instance "Can't pull or push after git clone - local changes".
If you had already committed changes, it would be best to:
tmp
branch at your current HEADHEAD
to origin/master
repo sync
.tmp
to master
Upvotes: 4