In Mercurial, what is the difference between
hg revert --all
and
hg up -C?
It seems that both commands revert all changes. But what is the difference?
with hg up
you actually switch to another revision (possibly abandoning your current branch)
with hg revert --all
you change all files to be the same as in another revision, but remaining on you current working directory (and branch), meaning you can proceed with commit, or modify a couple of stuff before making such commit
it is more common to hg revert
one single file, and that is why when you revert them all Mercurial asks you whether you are sure about that, or else want to perform an update instead
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.