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

Raw commands to add object to existing tree

From
DSD Sundstrom <sunds@peapod.net>
Date
Aug 21, 2009, 22:31 UTC
Message-ID
<ef72456d0908211531m5e261805p2f67d3a8a16a0b5@mail.gmail.com>

Both the community git manual: http://book.git-scm.com/7_raw_git.html

and Pro Git book: http://progit.org/book/ch9-2.html

walk you though low level details of creating objects and trees in git, and then committing these new trees.

However, they do not show you how to add and commit into existing trees.

Speaking in terms of files, I have a web application that needs to replace a file in a known directory in a known branch of a bare repository. I know the SHA1s of the directory tree and file. I want to commit directly into a bare repository to avoid having to manage working directories for different branches from the web application.

Thanks! David

Next: Avery Pennarun
Message 1 of 4 in “Raw commands to add object to existing tree”
  1. D SundstromAug 21, 2009
  2. Avery PennarunAug 21, 2009
  3. Linus TorvaldsAug 21, 2009
  4. Avery PennarunAug 21, 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.