From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Sajan Parikh <sajan@parikh.io>
Cc: git@vger.kernel.org
Subject: Re: Syncing Git Repositories
Date: Thu, 17 Jul 2014 08:53:11 +0200 [thread overview]
Message-ID: <vpqwqbcv5m0.fsf@anie.imag.fr> (raw)
In-Reply-To: <53C7343F.4090806@parikh.io> (Sajan Parikh's message of "Wed, 16 Jul 2014 21:26:07 -0500")
Sajan Parikh <sajan@parikh.io> 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/
next prev parent reply other threads:[~2014-07-17 6:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 2:26 Syncing Git Repositories Sajan Parikh
2014-07-17 6:53 ` Matthieu Moy [this message]
2014-07-17 16:35 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqwqbcv5m0.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=sajan@parikh.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).