-
How do I view commits that are about to be pushed?
-
I’d made a local commit. Pull a change. And no it requires a merge.
I prefer not to merge and would like to undo the commit,
Pull,
Update changes,
Then commit again.
How do I do it since rollback only undo the last command which is pull?
Use
hg outgoing. That shows whathg pushwould have sent to the server. The opposite command ishg incoming, which shows whathg pullwould have retrieved.Like Mark says, you’re looking for the rebase extension. Enable it with
in your config file and then run
to move your local work (this can be multiple changesets, not just a single as in your work around!) on top of the changesets you just pulled down.
Please don’t use
hg rollbackas a general undo mechanism. It’s a low-level command that should not be used as much as it is, especially not by new users. The rollback command removes the last transaction from the repository — a transaction in Mercurial is typically the last changeset you made or the last changesets (plural) you pulled into the repository.