Reputation: 62244
Suppose you have commit some changes, and then somehow deleted/modified some files by accident.
Which would be better? Using revert
oder update
?
Upvotes: 6
Views: 3681
Reputation: 16762
There are two big differences between running hg update -C and doing hg revert -a
The revert command on the other hand
Now which is better? Depends in which of the things listed above you want.
Upvotes: 9
Reputation: 78350
In your case you want revert
-- it alters your working directory without altering the output of the hg parents
command. Your parent revision
is the "currently checked out revision" and will become the "parent" of your next commit. You don't need to alter that pointer, so just revert
.
Upvotes: 2