rsync .git directory
There are a few possibilities:
You can just
rsync
the.git
repository (or even whole repository together with working directory), provided that you don't have any activity in repository duringrsync
ing (same disclaimer as for usingrsync://
protocol).You can clone or fetch using deprecatedrsync
protocol (where repository URL / location looks like this: "rsync://host.xz/path/to/repo.git/
"). Note that this protocol is deprecated, because if there is any activity in repository, you can get corrupted clone (or fetch).Also, as I have heard, it didn't work correctly in the presence of packed refs since 2007, and nobody noticed till recently.It will (it did) disappear in Git 2.8.Or you can create git bundle,
rsync
it orscp
it on other machine, and then clone or fetch from bundle.