threads / discuss / 41074

git objects

Subject: git objects

## tl;dr

2 messages between Dec 24, 2015 and Dec 24, 2015.

replies: 1people: 2as markdown or json

Thiago Farina· Dec 24, 2015, 22:17 UTC · lore
Hi,

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?
-- 
Thiago Farina
Shawn Pearce· Dec 24, 2015, 23:34 UTC · re: Thiago Farina · lore

Re: git objects

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".

← back to recent threads