Difference between git-clone --bare and git-push --all to empty repo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a private repository on my laptop and for backup purposes only, I created a remote repository to push to.

I created the remote repo in two ways:

1. git-clone --bare

I used git-clone --bare to create a bare repository with a copy of my work and rsync'ed that to the remote server

2. git init a bare repo and git push --all

I created a empty bare repository with

   mkdir project_backup
   GIT_DIR=project_backup git init

and then pushed my work to it:

  cd project
  git push --all ../project_backup

and rsync'ed the project_backup directory.

I see the same number of objects and the same branches on both bare repositories, but the first one created with git-clone uses a lot more space, even after git-repack -d -a on both.

I'm still learning the internals of git, but I could not find any explanation for this. Care to enlighten me?

Thanks in advance,
--
Pedro Melo
Blog: http://www.simplicidade.org/notes/
XMPP ID: melo@xxxxxxxxxxxxxxxx
Use XMPP!


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux