Johnny Johnny - 1 month ago 14
Android Question

How to discard changes using repo

repo status
shows me a lot of un-wanted changes.

It would be duplicated if I enter every project and use
git reset --hard
.

Is there a way to reset all the changes using repo, something like
repo reset --hard
?

Answer

You can use the repo command as the following to revert all your changes:

repo sync -d

This will revert all your changes back to original revision.

Or else you can use git as stated in Version Control with Repo and Git

Edited:

The command above is working only with the version at that time.

The working command is :

repo forall -vc "git reset --hard"
Comments