git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Binary files in a linear repository

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Nov 2, 2009, 16:09 UTC
Message-ID
<20091102160903.GA6197@atjola.homenet>
In-Reply-To
<20091102154831.GC27126@dpotapov.dyndns.org>
On 2009.11.02 18:48:31 +0300, Dmitry Potapov wrote:
Show 17 quoted lines
> On Mon, Nov 02, 2009 at 04:08:25PM +0100, Markus Hitter wrote:
> >
> > Now I'm thinking about a much simpler solution: Simply declare the  
> > current set of files as (a modified) master/com005 and commit them. A  
> > "cp $GIT_DIR/master $GIT_DIR/HEAD" followed by a commit would do it.
> >
> > Now my question: Is it safe to tweak the files in $GIT_DIR this way or 
> > will this corrupt the repository?
> 
> 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.

Björn
Previous: Dmitry PotapovNext: Dmitry Potapov
Message 4 of 8 in “Binary files in a linear repository”
  1. Markus HitterNov 2, 2009
  2. Björn SteinbrinkNov 2, 2009
  3. Dmitry PotapovNov 2, 2009
  4. Björn SteinbrinkNov 2, 2009
  5. Dmitry PotapovNov 2, 2009
  6. Björn SteinbrinkNov 2, 2009
  7. Dmitry PotapovNov 2, 2009
  8. Björn SteinbrinkNov 2, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.