git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Atsushi Nakagawa <atnak@chejz.com>
Cc: git@vger.kernel.org
Subject: Re: Reset by checkout?
Date: Mon, 02 Jun 2014 14:29:19 -0700	[thread overview]
Message-ID: <xmqqvbsj2e6o.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140531144610.754B.B013761@chejz.com> (Atsushi Nakagawa's message of "Sat, 31 May 2014 14:46:12 +0900")

Atsushi Nakagawa <atnak@chejz.com> writes:

> One of the more underrepresented command I use in git use on a regular
> basis is this "reset by checkout".  It's what's currently achieved by
> this convoluted expression:
>
>   `git checkout -B <current-branch-name> <tree-ish>`
>
> This is such an useful notion that I can fathom why there isn't a better,
> first-tier, alternative.

Hmph.  checkout *is* the first-tier way to do this.  Why do you even
want to do it via "reset"?  Is it because you learned "reset" first
and then learned how "checkout" with various modes all do useful
things?

  parent reply	other threads:[~2014-06-02 21:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-31  5:46 Reset by checkout? Atsushi Nakagawa
2014-05-31  7:03 ` Andreas Schwab
2014-06-01  2:56   ` Atsushi Nakagawa
2014-05-31  7:27 ` Kevin Bracey
2014-06-01  4:26   ` Atsushi Nakagawa
2014-06-01  8:45     ` Kevin Bracey
2014-06-02 21:54       ` Junio C Hamano
2014-06-03 19:48         ` Kevin Bracey
2014-06-03 21:48           ` Felipe Contreras
2014-06-07  4:54       ` Atsushi Nakagawa
2014-06-07 14:52         ` Philip Oakley
2014-06-09 20:12           ` Kevin Bracey
2014-06-07  4:55     ` Atsushi Nakagawa
2014-05-31 10:56 ` Felipe Contreras
2014-05-31 23:39   ` Felipe Contreras
2014-06-01  4:58     ` Atsushi Nakagawa
2014-06-02 21:29 ` Junio C Hamano [this message]
2014-06-02 21:31   ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=xmqqvbsj2e6o.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=atnak@chejz.com \
    --cc=git@vger.kernel.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.
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 NNTP newsgroup(s).