Which VCSes have "uncommit"?

John Arbash Meinel john at arbash-meinel.com
Thu Nov 5 17:17:18 GMT 2009

Hash: SHA1

Neil Martinsen-Burrell wrote:
> On 2009-11-05 09:41 , Daniel Carrera wrote:
>> Does anyone know which distributed VCSes have an "uncommit" feature at
>> least as powerful and at least as easy as the one from Bazaar? The only
>> examples I know are Bazaar and Darcs ("darcs unrecord").
>> I get the impression that Mercurial and Git can use "rebase" to achieve
>> this, but that this is more complicated. So they would meet the "at
>> least as powerful" criterion but not the "at least as easy" criterion.
> As far as I know, every dVCS can do this operation because it is a
> simple operation on the DAG: change the tip pointer to point to the
> parent of the current revision.  This is in fact what ``bzr uncommit``
> does.  If you want to get particularly explicit with this, you can
> uncommit as many revisions as you want using ``bzr pull . --overwrite -r
> -N`` (which I've had to do recently after accidentally pulling from
> trunk while in a release branch).  A bit of googling shows that
> equivalents are ``git reset --hard HEAD~N`` or ``hg rollback`` (for a
> single revision).
> -Neil

The main difference between "bzr pull . --overwrite" and "bzr uncommit"
is that 'uncommit' leaves the working tree alone (assuming you want to
do something with the previously committed changes, like a cleanup +

'bzr pull . --overwrite' is more "bzr uncommit && bzr revert".


Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the bazaar mailing list