unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: David Reitter <david.reitter@gmail.com>, emacs-devel@gnu.org
Subject: Re: 23 branch - can't push - lock
Date: Sun, 19 Jun 2011 22:42:07 +0900	[thread overview]
Message-ID: <87y60yj5u8.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <83sjr8wjow.fsf@gnu.org>

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
implement.



  parent reply	other threads:[~2011-06-19 13:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 15:49 23 branch - can't push - lock David Reitter
2011-06-16 16:28 ` David Reitter
2011-06-16 21:44   ` Glenn Morris
2011-06-16 17:27 ` Eli Zaretskii
2011-06-16 17:44   ` David Reitter
2011-06-16 20:09     ` Eli Zaretskii
2011-06-17 13:57       ` David Reitter
2011-06-17 15:39         ` Eli Zaretskii
2011-06-17 19:19           ` UI / reaction time - was: " David Reitter
2011-06-17 21:59             ` chad
2011-06-19 13:42           ` Stephen J. Turnbull [this message]
2011-06-17 16:30         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y60yj5u8.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=david.reitter@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).