[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23 branch - can't push - lock

From: Stephen J. Turnbull
Subject: Re: 23 branch - can't push - lock
Date: Sun, 19 Jun 2011 22:42:07 +0900

Eli Zaretskii writes:

 > > Is there a way to reset a branch to a previous commit, i.e., the 
 > > equivalent of "git reset --hard"?
 > That's git talk, and I don't really know what it means.

It means moving the tip pointer of the current branch to point at a
different revision (usually older, but not necessarily so), and
simultaneously checkout the workspace corresponding to that revision.

The answer is yes, Robert Collins told me how to do it about three
years ago, but in vanilla bzr there was no simple equivalent to

    git tag tmp
    git reset --hard somewhere-else

so the bzr equivalent was necessarily destructive unless you extract
the rev-id and save it away by hand.  (Of course this is scriptable.)
I found that sufficiently painful that I just avoid the need, and
don't recall that necessary arcana.

Depending on the use case there are various commands that have the
same effect that "git --reset hard" does, but none of them work across
the board.  Look up the docs for update, revert, and uncommit.

I would assume that colo-enabled versions of bazaar have something
similar to git reset, though, and if not it shouldn't be hard to

reply via email to

[Prev in Thread] Current Thread [Next in Thread]