{"thread":{"id":"13929","subject":"Difference between git-clone --bare and git-push --all to empty repo","startedAt":"2008-06-13T11:23:35Z","lastAt":"2008-06-13T11:23:35Z","messageCount":1,"participants":["Pedro Melo"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"79708","messageId":"7D042A31-9CC8-4740-8185-7165AEF6E0DF@simplicidade.org","threadId":"13929","inReplyTo":null,"subject":"Difference between git-clone --bare and git-push --all to empty repo","fromName":"Pedro Melo","fromEmail":"melo@simplicidade.org","sentAt":"2008-06-13T11:23:35Z","receivedAt":"2008-06-13T11:23:35Z","isPatch":false,"sender":{"key":"melo@simplicidade.org","avatar":"https://gravatar.com/avatar/13ddbb01e300285a93aa1e3739653a81f9b1d3438bd03a4ac36b88e4ffeeafc3?d=mp&s=160"},"body":"Hi,\n\nI have a private repository on my laptop and for backup purposes  \nonly, I created a remote repository to push to.\n\nI created the remote repo in two ways:\n\n1. git-clone --bare\n\nI used git-clone --bare to create a bare repository with a copy of my  \nwork and rsync'ed that to the remote server\n\n2. git init a bare repo and git push --all\n\nI created a empty bare repository with\n\n    mkdir project_backup\n    GIT_DIR=project_backup git init\n\nand then pushed my work to it:\n\n   cd project\n   git push --all ../project_backup\n\nand rsync'ed the project_backup directory.\n\nI see the same number of objects and the same branches on both bare  \nrepositories, but the first one created with git-clone uses a lot  \nmore space, even after git-repack -d -a on both.\n\nI'm still learning the internals of git, but I could not find any  \nexplanation for this. Care to enlighten me?\n\nThanks in advance,\n-- \nPedro Melo\nBlog: http://www.simplicidade.org/notes/\nXMPP ID: melo@simplicidade.org\nUse XMPP!\n"}]}