Which VCSes have "uncommit"?
Neil Martinsen-Burrell
nmb at wartburg.edu
Thu Nov 5 17:02:25 GMT 2009
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
More information about the bazaar
mailing list