Re: Binary files in a linear repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]