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

Re: Can I checkout a single file without altering index?

From
NKNeal Kreitzinger <neal@rsss.com>
Date
Oct 15, 2010, 18:57 UTC
Message-ID
<i9a88i$k3g$1@dough.gmane.org>
In-Reply-To
<20101015184302.GA22990@burratino>

"Jonathan Nieder" <jrnieder@gmail.com> wrote in message news:20101015184302.GA22990@burratino...

Show 9 quoted lines
> Hi Neal,
>
> Neal Kreitzinger wrote:
>
>> However, there is an option in git-commit to copy files directly from the
>> working-tree to the object-store by totally bypassing the index
>
> What option is this?  I thought "git commit --include" added content
> to the index.
>From the git-commit manpage (1.7.1.2):

"3. by listing files as arguments to the commit command, in which case the commit will ignore changes staged in the index, and instead record the current content of the listed files (which must already be known to git); "

(I haven't tried it myself because to me the index is a key technology of git so I'm not sure why I would want to bypass it.)

v/r, Neal

Previous: Jeff KingNext: Andreas Schwab
Message 13 of 16 in “Can I checkout a single file without altering index?”
  1. Christian HalstrickOct 12, 2010
  2. Michael J GruberOct 12, 2010
  3. Stefan NaeweOct 12, 2010
  4. Jared HanceOct 13, 2010
  5. Alex RiesenOct 12, 2010
  6. Tomas CarneckyOct 12, 2010
  7. Christian HalstrickOct 14, 2010
  8. Neal KreitzingerOct 15, 2010
  9. Jonathan NiederOct 15, 2010
  10. Jeff KingOct 15, 2010
  11. Jonathan NiederOct 15, 2010
  12. Jeff KingOct 15, 2010
  13. Neal KreitzingerOct 15, 2010
  14. Andreas SchwabOct 15, 2010
  15. Junio C HamanoOct 15, 2010
  16. Jonathan NiederOct 15, 2010

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.