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

Re: clone --bare vs push

From
NKNeal Kreitzinger <neal@rsss.com>
Date
Jan 4, 2011, 04:40 UTC
Message-ID
<ifu8d2$t61$1@dough.gmane.org>
In-Reply-To
<AANLkTi=RNDYrRbyEJXA_c30JEVr=SYUQ01cfA3FyWpLT@mail.gmail.com>

"Levend Sayar" <levendsayar@gmail.com> wrote in message news:AANLkTi=RNDYrRbyEJXA_c30JEVr=SYUQ01cfA3FyWpLT@mail.gmail.com...

Show 39 quoted lines
> Hi, all.
>
> We cloned a repo from github on our local server. Say X for this. At
> that repo, we did
>
> git clone --bare X y.git
>
> Now y.git is ready for other machines to clone.
>
> To update our upstream repo X, we do
>
> git pull
>
> and then
>
> git push --all
>
> to update y.git.
>
> Now questions:
>
> 1) When I compare X/.git directory and y.git directory there are many
> objects missing in y.git. What is the reason ?
>
> 2) git clone --bare is too fast. My .git directory is nearly 1GB. How
> can it be copied that much fast ?
>
> 3) Is this more safe then git pull, git push
>
> rm -rf y.git
> git pull
> git clone --bare X y.git
>
> Namely bare cloning each time when we update our main repo ?
>
> TIA
>
> _lvnd_
> (^_^)

you can also use the file:// url format to create a complete copy and not use hardlinks. see git-clone manpage.

e.g. git clone --bare file:///fullpathto/X y.git

v/r, Neal

Previous: Ævar Arnfjörð BjarmasonNext: Jonathan Nieder
Message 3 of 5 in “clone --bare vs push”
  1. Levend SayarJan 3, 2011
  2. Ævar Arnfjörð BjarmasonJan 3, 2011
  3. Neal KreitzingerJan 4, 2011
  4. Jonathan NiederJan 4, 2011
  5. Neal KreitzingerJan 4, 2011

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.