git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Dmitry Potapov <dpotapov@gmail.com>
Cc: Markus Hitter <mah@jump-ing.de>, git@vger.kernel.org
Subject: Re: Binary files in a linear repository
Date: Mon, 2 Nov 2009 18:01:06 +0100	[thread overview]
Message-ID: <20091102170106.GA8650@atjola.homenet> (raw)
In-Reply-To: <20091102165215.GD27126@dpotapov.dyndns.org>

On 2009.11.02 19:52:15 +0300, Dmitry Potapov wrote:
> On Mon, Nov 02, 2009 at 05:09:03PM +0100, Björn Steinbrink wrote:
> > On 2009.11.02 18:48:31 +0300, Dmitry Potapov wrote:
> > > On Mon, Nov 02, 2009 at 04:08:25PM +0100, Markus Hitter wrote:
> > > You probably should use 'git update-ref' if you want to change HEAD
> > > manually. But it seems to me that you do not need even that. All what
> > > you need is:
> > > 
> > > $ git reset --soft master
> > > 
> > > and then commit your changes (git reset --soft does not touch the index
> > > file nor the working tree at all).
> > 
> > But then you still have to do:
> > git checkout master
> > git merge HEAD@{1}
> > 
> > To actually update the "master" branch head. The reset doesn't re-attach
> > HEAD.
> 
> You are right... I forgot about that somehow. So, it should be
> 
> $ git reset --soft master
> $ git checkout master
> 
> and only then
> 
> $ git commit

That would do, but:
git checkout <commit>
*make changes*
git reset --soft master
git checkout master
git commit

seems unnecessarily complicated, when you could as well do:
git read-tree -u --reset <commit>
*make changes*
git commit

Björn

  reply	other threads:[~2009-11-02 17:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <S1754797AbZKBONX/20091102141323Z+268@vger.kernel.org>
2009-11-02 15:08 ` Binary files in a linear repository Markus Hitter
2009-11-02 15:34   ` Björn Steinbrink
2009-11-02 15:48   ` Dmitry Potapov
2009-11-02 16:09     ` Björn Steinbrink
2009-11-02 16:52       ` Dmitry Potapov
2009-11-02 17:01         ` Björn Steinbrink [this message]
2009-11-02 17:45           ` Dmitry Potapov
2009-11-02 18:37             ` Björn Steinbrink

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=20091102170106.GA8650@atjola.homenet \
    --to=b.steinbrink@gmx.de \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mah@jump-ing.de \
    /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).