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

Re: How should I handle binary file with GIT

From
MRMarco Roeland <marco.roeland@xs4all.nl>
Date
Apr 5, 2006, 19:23 UTC
Message-ID
<20060405192321.GA20854@fiberbit.xs4all.nl>
In-Reply-To
<20060405131834.60888.qmail@web25804.mail.ukl.yahoo.com>
On Wednesday April 5th 2006 moreau francis wrote:
> BTW, what does "--amend" option do ? It doesn't seem to be documented anywhere.
This is the original commit text that introduced it:
diff-tree b4019f045646b1770a80394da876b8a7c6b8ca7b (from d320a5437f8304cf9ea3ee1898e49d643e005738)
Author: Junio C Hamano <junkio@cox.net>
Date:   Thu Mar 2 21:04:05 2006 -0800
    git-commit --amend
    
    The new flag is used to amend the tip of the current branch.  Prepare
    the tree object you would want to replace the latest commit as usual
    (this includes the usual -i/-o and explicit paths), and the commit log
    editor is seeded with the commit message from the tip of the current
    branch.  The commit you create replaces the current tip -- if it was a
    merge, it will have the parents of the current tip as parents -- so the
    current top commit is discarded.
    
    It is a rough equivalent for:
    
    	$ git reset --soft HEAD^
    	$ ... do something else to come up with the right tree ...
    	$ git commit -c ORIG_HEAD
    
    but can be used to amend a merge commit.
    
    Signed-off-by: Junio C Hamano <junkio@cox.net>

So in the original context you can add separate binaries to a commit of only text files that you just rescued from CVS or something and then change the commit to include these binaries as well.

I've sent a separate patch for the documentation for git-commit using Junio's clear explanation.

-- 
Marco Roeland
Previous: moreau francisNext: Jakub Narebski
Message 8 of 18 in “How should I handle binary file with GIT”
  1. moreau francisApr 5, 2006
  2. Junio C HamanoApr 5, 2006
  3. moreau francisApr 5, 2006
  4. Nicolas PitreApr 5, 2006
  5. moreau francisApr 5, 2006
  6. Nicolas PitreApr 5, 2006
  7. moreau francisApr 5, 2006
  8. Marco RoelandApr 5, 2006
  9. Jakub NarebskiApr 5, 2006
  10. Nicolas PitreApr 5, 2006
  11. Randal L. SchwartzApr 5, 2006
  12. Shawn PearceApr 5, 2006
  13. Nicolas PitreApr 5, 2006
  14. Nicolas PitreApr 5, 2006
  15. Junio C HamanoApr 5, 2006
  16. Randal L. SchwartzApr 5, 2006
  17. Nicolas PitreApr 5, 2006
  18. Junio C HamanoApr 5, 2006

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.