From: Thomas Rast <trast@student.ethz.ch>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: git reset --merge misdocumented?
Date: Sat, 31 Jan 2009 00:20:18 +0100 [thread overview]
Message-ID: <200901310020.23851.trast@student.ethz.ch> (raw)
In-Reply-To: <alpine.DEB.1.00.0901290210540.3586@pacific.mpi-cbg.de>
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
Johannes Schindelin wrote:
> from the man page I thought that --merge would be just another way to say
> "git read-tree -u -m".
Isn't that idea from the commit message? I can't find any mention of
read-tree in next's idea of the manpage.
> In particular, the man page says _nothing_ about resetting HEAD to
> something else.
It says
--merge::
Resets the index to match the tree recorded by the named commit,
and updates the files that are different between the named commit
and the current commit in the working tree.
so while the exact way of "updating" is not specified, it does mention
that you can move between commits, and that it will do something with
the difference across the move.
The example further down really cleared up the idea for me:
Undo a merge or pull inside a dirty work tree::
+
------------
$ git pull <1>
Auto-merging nitfol
Merge made by recursive.
nitfol | 20 +++++----
...
$ git reset --merge ORIG_HEAD <2>
------------
I've never used 'read-tree -u -m' except in voodoo scripting, but I'd
have done the same with 'git stash && git reset --hard ORIG_HEAD &&
git stash pop' before. The original commit message even mentions this
equivalence.
So I'm not sure what exactly needs changing there?
--
Thomas Rast
trast@{inf,student}.ethz.ch
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2009-01-30 23:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 1:17 git reset --merge misdocumented? Johannes Schindelin
2009-01-30 23:20 ` Thomas Rast [this message]
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=200901310020.23851.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=Johannes.Schindelin@gmx.de \
--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).