All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	Mark Lodato <lodatom@gmail.com>, git list <git@vger.kernel.org>
Subject: Re: Announcing git-reparent
Date: Mon, 14 Jan 2013 21:08:58 +0100	[thread overview]
Message-ID: <m21udnzfvp.fsf@igel.home> (raw)
In-Reply-To: <CAA01Csoh24ppo37fzptzZKvFrzGQyhz-0eDTQsP8tZiTRQ2YwA@mail.gmail.com> (Piotr Krukowiecki's message of "Mon, 14 Jan 2013 09:03:31 +0100")

Piotr Krukowiecki <piotr.krukowiecki@gmail.com> writes:

> Just wondering, is the result different than something like
>
> git checkout commit_to_reparent
> cp -r * ../snapshot/
> git reset --hard new_parent
> rm -r *
> cp -r ../snapshot/* .
> git add -A

I think you are looking for "git reset --soft new_parent", which keeps
both the index and the working tree intact.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2013-01-14 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14  6:15 Announcing git-reparent Mark Lodato
2013-01-14  7:16 ` Jonathan Nieder
2013-01-14  8:03   ` Piotr Krukowiecki
2013-01-14 20:08     ` Andreas Schwab [this message]
2013-01-14 20:28     ` Mark Lodato
2013-01-14  8:05   ` 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=m21udnzfvp.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=lodatom@gmail.com \
    --cc=piotr.krukowiecki@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.