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

Re: git objects

From
Shawn Pearce <spearce@spearce.org>
Date
Dec 24, 2015, 23:34 UTC
Message-ID
<CAJo=hJt9c6gr9AuapR7yUSYchF8=67AYQp-06XrTudbfa2ipkA@mail.gmail.com>
In-Reply-To
<CACnwZYfMKG18ZTR3bCLY5FRsBYmSsC9Co2e=iLRYxsM=w=Dqog@mail.gmail.com>
On Thu, Dec 24, 2015 at 2:17 PM, Thiago Farina <tfransosi@gmail.com> wrote:
Show 5 quoted lines
>
> When ever I make a commit (assume I'm changing a single file) and do a
> 'git push origin master', git says 'Counting objects: 6, done.'
>
> Does git makes 6 objects everytime? What are those objects?

1 commit object; 1 blob object for the new file revision; 1 tree object for the top level directory; 3 tree objects for intermediate paths = 6

So your single file is some path like "src/main/lib/foo.c".
Previous: Thiago Farina
Message 2 of 2 in “git objects”
  1. Thiago FarinaDec 24, 2015
  2. Shawn PearceDec 24, 2015

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.