Git development
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org
Subject: git + unison
Date: Sun, 02 Dec 2007 18:59:36 +0100	[thread overview]
Message-ID: <vpqd4tpgepj.fsf@bauges.imag.fr> (raw)

Hi,

I'm wondering how dangerous the interaction of git with the unison
file synchronizer[1] can be.

Another way of asking the question can be: what's the best way to
keep two machines with many git repositories in sync?

Unison is a userland application that does bi-directional
synchronization of two directories. Typically, to keep a laptop and a
desktop synchronized (modify a file on the desktop and another on the
laptop, unison will copy the files). I find it very usefull to keep
large directories containing unrelated projects (typically,
~/teaching/, ~/research, ..., my colleagues even synchronize $HOME on
their laptops) in sync between two machines.

Actually, git achives something similar (and lot more, of course):
modify a file here, commit, modify another there, commit, and then
push & pull can do the sync. I find git excellent to manage somehow
self-contained projects (~/teaching/2007-2008/whatever-course/), but
inappropriate for $HOME or such big containers (need to run more
commands, disk-space overhead, ...).

So, at the moment, I have both unison and git. My fear is that unison
touches the content of the .git/ directories. So, for example, if I
commit on one side, and commit something else on the other side, I'll
get unison conflicts at least on .git/refs/heads/master and
.git/index, and resolving the conflict in favor of either side leads
to dangling objects whith important content.

What I'm doing right now is that I try to make sure I don't run unison
when trees have diverged, which is not really satisfactory since 1) I
can be wrong, and a miss-synchronization could lead to data-loss, and
2) that means not really taking advantage of unison.


What about you? What do you use to synchronize your laptop and
desktop, or home and office? Anybody using unison and git on the same
filesystem?

Thanks for your hints,

-- 
Matthieu

[1] : http://www.cis.upenn.edu/~bcpierce/unison/

             reply	other threads:[~2007-12-02 18:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-02 17:59 Matthieu Moy [this message]
2007-12-02 18:13 ` git + unison Remi Vanicat
2007-12-02 19:05 ` J. Bruce Fields

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=vpqd4tpgepj.fsf@bauges.imag.fr \
    --to=matthieu.moy@imag.fr \
    --cc=git@vger.kernel.org \
    /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