git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why very small repository has 2.7M size
@ 2008-01-19  9:43 Ping Yin
  2008-01-19  9:48 ` Ping Yin
  0 siblings, 1 reply; 4+ messages in thread
From: Ping Yin @ 2008-01-19  9:43 UTC (permalink / raw)
  To: Git Mailing List

$ ~/test/bar$ ll -h && git gc
total 8.0K
-rwxr-xr-x 1 yinping yinping 131 2008-01-19 17:35 Makefile.crawler
-rwxr-xr-x 1 yinping yinping 131 2008-01-19 17:37 Makefile.search
Counting objects: 87, done.
Compressing objects: 100% (78/78), done.
Writing objects: 100% (87/87), done.
Total 87 (delta 8), reused 87 (delta 8)

$ ~/test/bar$ du -h . | tail -10
8.0K    ./.git/objects/info
2.5M    ./.git/objects/pack
2.5M    ./.git/objects
8.0K    ./.git/logs/refs/heads
20K     ./.git/logs/refs/remotes/origin
24K     ./.git/logs/refs/remotes
36K     ./.git/logs/refs
44K     ./.git/logs
2.7M    ./.git
2.7M    .

-- 
Ping Yin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why very small repository has 2.7M size
  2008-01-19  9:43 Why very small repository has 2.7M size Ping Yin
@ 2008-01-19  9:48 ` Ping Yin
  2008-01-19 10:57   ` Jean-Luc Herren
  0 siblings, 1 reply; 4+ messages in thread
From: Ping Yin @ 2008-01-19  9:48 UTC (permalink / raw)
  To: Git Mailing List

Of course with short history

~/test/bar$ ll -ah && git gc
total 20K
drwxr-xr-x 3 yinping yinping 4.0K 2008-01-19 17:44 .
drwxr-xr-x 8 yinping yinping 4.0K 2008-01-19 17:36 ..
drwxr-xr-x 8 yinping yinping 4.0K 2008-01-19 17:44 .git
-rw-r--r-- 1 yinping yinping   26 2008-01-19 17:33 .gitignore
-rwxr-xr-x 1 yinping yinping  131 2008-01-19 17:44 Makefile.common
Counting objects: 87, done.
Compressing objects: 100% (78/78), done.
Writing objects: 100% (87/87), done.
Total 87 (delta 8), reused 87 (delta 8)

~/test/bar$ git log --pretty=oneline
4046b84344038d63b655b56f6e619888dd424e4e Add Makefile.common using commonmake
8bbd7d4649ac1df1b29414b2ec469f532a77f222 Init empty repository, ignore
*.o, *.d, *~, *.swp, CVS, .svn

~/test/bar$ du -h . | tail -10
8.0K    ./.git/objects/info
2.5M    ./.git/objects/pack
2.5M    ./.git/objects
8.0K    ./.git/logs/refs/heads
20K     ./.git/logs/refs/remotes/origin
24K     ./.git/logs/refs/remotes
36K     ./.git/logs/refs
44K     ./.git/logs
2.7M    ./.git
2.7M    .

On Jan 19, 2008 5:43 PM, Ping Yin <pkufranky@gmail.com> wrote:
> $ ~/test/bar$ ll -h && git gc
> total 8.0K
> -rwxr-xr-x 1 yinping yinping 131 2008-01-19 17:35 Makefile.crawler
> -rwxr-xr-x 1 yinping yinping 131 2008-01-19 17:37 Makefile.search
> Counting objects: 87, done.
> Compressing objects: 100% (78/78), done.
> Writing objects: 100% (87/87), done.
> Total 87 (delta 8), reused 87 (delta 8)
>
> $ ~/test/bar$ du -h . | tail -10
> 8.0K    ./.git/objects/info
> 2.5M    ./.git/objects/pack
> 2.5M    ./.git/objects
> 8.0K    ./.git/logs/refs/heads
> 20K     ./.git/logs/refs/remotes/origin
> 24K     ./.git/logs/refs/remotes
> 36K     ./.git/logs/refs
> 44K     ./.git/logs
> 2.7M    ./.git
> 2.7M    .
>
> --
> Ping Yin
>



-- 
Ping Yin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why very small repository has 2.7M size
  2008-01-19  9:48 ` Ping Yin
@ 2008-01-19 10:57   ` Jean-Luc Herren
  2008-01-19 13:59     ` Ping Yin
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Luc Herren @ 2008-01-19 10:57 UTC (permalink / raw)
  To: Ping Yin; +Cc: Git Mailing List

Ping Yin wrote:
> -rw-r--r-- 1 yinping yinping   26 2008-01-19 17:33 .gitignore
> -rwxr-xr-x 1 yinping yinping  131 2008-01-19 17:44 Makefile.common
> [...]
> Counting objects: 87, done.
> [...]
> 4046b84344038d63b655b56f6e619888dd424e4e Add Makefile.common using commonmake
> 8bbd7d4649ac1df1b29414b2ec469f532a77f222 Init empty repository, ignore
> *.o, *.d, *~, *.swp, CVS, .svn

You sure have a lot of objects for only having two commits and two
files.  Maybe some of the objects are loose ones?  Try running
'git gc --prune' to see if that removes them.  But be aware that
this deletes them all, you might want to check first if the loose
objects are something you wanted to keep (with 'git fsck' and 'git
show').

jlh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why very small repository has 2.7M size
  2008-01-19 10:57   ` Jean-Luc Herren
@ 2008-01-19 13:59     ` Ping Yin
  0 siblings, 0 replies; 4+ messages in thread
From: Ping Yin @ 2008-01-19 13:59 UTC (permalink / raw)
  To: Jean-Luc Herren; +Cc: Git Mailing List

On Jan 19, 2008 6:57 PM, Jean-Luc Herren <jlh@gmx.ch> wrote:
> Ping Yin wrote:
> > -rw-r--r-- 1 yinping yinping   26 2008-01-19 17:33 .gitignore
> > -rwxr-xr-x 1 yinping yinping  131 2008-01-19 17:44 Makefile.common
> > [...]
> > Counting objects: 87, done.
> > [...]
> > 4046b84344038d63b655b56f6e619888dd424e4e Add Makefile.common using commonmake
> > 8bbd7d4649ac1df1b29414b2ec469f532a77f222 Init empty repository, ignore
> > *.o, *.d, *~, *.swp, CVS, .svn
>
> You sure have a lot of objects for only having two commits and two
> files.  Maybe some of the objects are loose ones?  Try running
> 'git gc --prune' to see if that removes them.  But be aware that
> this deletes them all, you might want to check first if the loose
> objects are something you wanted to keep (with 'git fsck' and 'git
> show').
>
Oh, sorry, my fault.
$ git branch -r

  origin/HEAD
  origin/backup
  origin/backup1
  origin/backup2
  origin/master
> jlh
>



-- 
Ping Yin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-19 14:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-19  9:43 Why very small repository has 2.7M size Ping Yin
2008-01-19  9:48 ` Ping Yin
2008-01-19 10:57   ` Jean-Luc Herren
2008-01-19 13:59     ` Ping Yin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).