Re: Syncing Git Repositories

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

 



Sajan Parikh <sajan@xxxxxxxxx> writes:

> By syncing my code folder and git repositories in this way, do I risk
> borking any repositories?  I'm 99% confident I'm not, since everything
> is in .git/, and there are not external databases or log files that
> need to be updated.  Just making sure though.

You're right that there are no external database, hence if you actually
sync the whole worktree+.git/, you won't have any problem.

I synchonize a bunch of Git repositories between machines with Unison
(file transfer utility), it works great.

One issue you may encounter is if you have either partial
synchronization (e.g. network loss in the middle of a synchronization, I
don't know how owncloud deals with it), or two way synchronization
(there's a synchronization between your laptop and owncloud ongoing, and
you start working on your desktop and trigger a synchronization.

I sometimes encounter this situation with unison. The good news is that
in 99,999% of cases where I'd encounter a problem, Unison shows a
conflict on the index file (modified on both sides). So, in these cases,
I just use Git normally to synchronize, decide that one side becomes the
reference, and rsync to the other to resolve the Unison conflict.

Also, you have to ensure that you synchronize both file
additions/modifications, and file deletions. I often make the mistake of
using rsync without --delete, and it confuses the branch storage format
(I keep my local unpacked branch, and the packed branch is hidden by
it).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]