From: Junio C Hamano <gitster@pobox•com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
Cc: Sajan Parikh <sajan@parikh•io>, git@vger•kernel.org
Subject: Re: Syncing Git Repositories
Date: Thu, 17 Jul 2014 09:35:24 -0700 [thread overview]
Message-ID: <xmqq61iwq6yb.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <vpqwqbcv5m0.fsf@anie.imag.fr> (Matthieu Moy's message of "Thu, 17 Jul 2014 08:53:11 +0200")
Matthieu Moy <Matthieu.Moy@grenoble-inp•fr> writes:
> 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).
All correct but .git/index may need to be refreshed, as your
cloudSync is unlikely to sync stat details across filesystems,
especially inum and possibly uid.
prev parent reply other threads:[~2014-07-17 16:35 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
2014-07-17 16:35 ` Junio C Hamano [this message]
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=xmqq61iwq6yb.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=Matthieu.Moy@grenoble-inp$(echo .)fr \
--cc=git@vger$(echo .)kernel.org \
--cc=sajan@parikh$(echo .)io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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