git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geoffrey Lee <geoffreyj.lee@gmail.com>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: chombee <chombee@lavabit.com>, git@vger.kernel.org
Subject: Re: Syncing a git working tree with Dropbox?
Date: Thu, 14 Jan 2010 05:19:08 -0800	[thread overview]
Message-ID: <83d7aaa41001140519g2f84199j38bd0e9a5c73953@mail.gmail.com> (raw)
In-Reply-To: <be6fef0d1001132139p56944cdax22674ca773af0199@mail.gmail.com>

On Wed, Jan 13, 2010 at 9:39 PM, Tay Ray Chuan <rctay89@gmail.com> wrote:
> On Thu, Jan 14, 2010 at 7:57 AM, chombee <chombee@lavabit.com> wrote:
>> My idea is that I keep my .git folder safely outside of my Dropbox
>> folder, but my git repository has a detached working tree that is
>> located in the Dropbox folder. On machine B it would be the same setup.
>> So the two machines each have their own clone of the git repo and these
>> are synchronised by git push and git pull with a 'central' remote repo.
>> But the two clones share the same working tree, or more accurately their
>> working trees are synced by Dropbox.
>>
>> The working tree is just files, I don't see how it's different from
>> Dropbox syncing any other files. Dropbox and git ought not to collide in
>> any way. So this should work fine shouldn't it?
>
> Your changes in git (like new commits) won't be synced.

You have to sync your .git directory. For example, using your setup,
if you switch branches on Machine A, your working directory will
change on Machine B, but Machine B will still think it's on the
previous branch. This scenario would cause a lot of problems for Git.

There shouldn't be any problems with placing your entire repository
(working tree and .git directory) inside Dropbox as long as you only
use one computer at a time.

-Geoffrey Lee

  reply	other threads:[~2010-01-14 13:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 23:57 Syncing a git working tree with Dropbox? chombee
2010-01-14  5:39 ` Tay Ray Chuan
2010-01-14 13:19   ` Geoffrey Lee [this message]
2010-01-14 13:40     ` chombee

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=83d7aaa41001140519g2f84199j38bd0e9a5c73953@mail.gmail.com \
    --to=geoffreyj.lee@gmail.com \
    --cc=chombee@lavabit.com \
    --cc=git@vger.kernel.org \
    --cc=rctay89@gmail.com \
    /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).