Re: rsync a *bunch* of git repos
- From
- Andreas T.Auer <andreas.t.auer_gtml_37453@ursus.ath.cx>
- Date
- Jan 11, 2012, 08:01 UTC
- Message-ID
- <4F0D41E3.5020908@ursus.ath.cx>
- In-Reply-To
- <20120110211548.GD10255@titan.lakedaemon.net>
On 10.01.2012 22:15 Jason wrote:
Show 7 quoted lines
> The nuts and bolts of this aren't difficult, the problem is I don't have > a complete understanding of how git stores data. I've heard in the > past that it uses a lot of hardlinks and softlinks. I need to make > sure, that once I transfer the data, and reboot the machine with the new > partition mounted under /home, that all my git repos will be okay. > >
As far as I know git uses hardlinks to save diskspace, but it doesn't rely on hardlinks to work. It also works with filesystems that don't support hardlinks. But without hardlinks you will probably waste disk space so I recommend the -H parameter to rsync, which preserve hardlinks, if possible. If you have hundreds of git repos that are cloned from each other, than this should make a difference.