Laser
Laser

Reputation: 6960

Rollback using repo command?

How can I do a rollback when I use the repo command?

I made some changes in some files and now I want to rollback to the source that was downloaded when I used the repo sync command.

I haven't committed the changes.

Upvotes: 8

Views: 5633

Answers (2)

Laser
Laser

Reputation: 6960

Right commands is:

If you want to revert changes made to your working copy, do this:
repo forall -c "git checkout ."

If you want to revert changes made to the index (i.e., that you have added), do this:
repo forall -c "git reset"

If you want to revert a change that you have committed, do this:
repo forall -c "git revert ..."

Upvotes: 5

shytikov
shytikov

Reputation: 9538

Use git reset then.

Repo is not meant to replace Git, only to make it easier to work with Git in the context of Android. via

According to the Repo command reference there is no equivalent of git reset command (yet?)

Upvotes: 1

Related Questions