git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: chombee <chombee@lavabit.com>
To: git@vger.kernel.org
Subject: Syncing a git working tree with Dropbox?
Date: Wed, 13 Jan 2010 23:57:18 +0000	[thread overview]
Message-ID: <20100113235718.GA7033@dulip> (raw)

I've heard of people keeping a bare repo in their Dropbox folder
(https://www.dropbox.com/) and pushing to and pulling from it, letting
Dropbox sync the bare repo between their machines. In other words using
Dropbox as a form of hosting for a private git repo. What I want to do
is sort of the other way around.

I keep on getting into the following mess: I have some changes in my
working tree on machine A, I stop working on machine A and don't commit
and push the changes (to my remote, 'central' bare repo) either because
they're not ready yet, or I forget to commit or push. Later on I arrive
at machine B which has its own clone of the same repo, but because I
didn't commit and push the changes on machine A I don't have access to
them on machine B and I can't continue working on them. The two machines
are physically located far away from each other and they're not
accessible over the internet. Argh!

Dropbox is a proprietary sync service that gets around this problem
because it automatically syncs your files whenever you save them. But I
still want to keep my project in a git repo. I'm assuming that keeping
the actual .git folder in a Dropbox folder, so that when git makes
changes inside the .git folder Drobox syncs them, would be a bad idea.
It seems like taking two different synchronisation systems and mashing
them into each other. But what about just the working tree?

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?

This way I don't need to commit and push my changes until they're
ready/I remember to, but whenever I move from machine A to machine B my
uncommitted changes will still be available to me because Dropbox has
synced my working tree automatically.

             reply	other threads:[~2010-01-13 23:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 23:57 chombee [this message]
2010-01-14  5:39 ` Syncing a git working tree with Dropbox? Tay Ray Chuan
2010-01-14 13:19   ` Geoffrey Lee
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=20100113235718.GA7033@dulip \
    --to=chombee@lavabit.com \
    --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;
as well as URLs for NNTP newsgroup(s).