git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Brenner <doom@kzsu.stanford.edu>
To: Noah Silverman <noah@smartmediacorp.com>
Cc: git@vger.kernel.org
Subject: Re: Advice on choosing git
Date: Wed, 12 May 2010 17:18:07 -0700	[thread overview]
Message-ID: <201005130018.o4D0I7iI079145@kzsu.stanford.edu> (raw)
In-Reply-To: <4BEA4B46.6010009@smartmediacorp.com>


Noah Silverman <noah@smartmediacorp.com> wrote:

> I'm looking for both a version control system and backup system.

I had a similar thought some time ago.  I thought that putting my life
inside of a distributed version control system (my first thought back
then was Monotone) would also be a convienient way to handle the
laptop-workstation sync problem.

But:

> 1) Size.  THIS IS MY MAIN CONCERN - If I want to sync my home, office,
> and server Document directories.  From what I have read, I will
> effectively have multiple copies of each item on my hard drive, thus
> eating up a lot of space

Pretty much any version control system is going to have this problem,
and it gets really bad if you've got any files that aren't straight text.

You won't get any benefit out of things like "git diff" either.  The
diffs we have (these days at least) don't work well on anything but plain
text.

I suggest you stick to using git down on the project level, where a
project should be limited to things like code development (or writing
projects where you stick to text formats), and give up on any ideas like
putting your entire home directory into a single repository.

As far as mirroring machines go, rsync based solutions actually aren't
that bad, though in addition to the annoying syntax gotchas, I've had
problems with an unreliable laptop clock.  Lately I've been using the
"--size-only" option of rsync, which assumes that if a file is bigger
it must be newer.

I tend to use a perl script something like this, which copies newer
stuff from a given directory to an analogous directory on a remote
machine:

  use File::Basename qw( dirname );
  my $this  = shift;   # e.g. '/home/doom/dev/code
  my $there = shift;   # e.g. 'doom@192.168.1.3'
  my $this_loc = dirname( $this );
  $cmd = "rsync -avz --size-only -e ssh $this $there:$this_loc";
  system( $cmd );

  parent reply	other threads:[~2010-05-13  0:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12  6:31 Advice on choosing git Noah Silverman
2010-05-12  9:04 ` Dmitry Potapov
2010-05-12  9:15 ` Ramkumar Ramachandra
2010-05-12  9:24 ` Jonathan Nieder
2010-05-13  0:18 ` Joe Brenner [this message]
2010-05-13  0:31   ` Avery Pennarun
2010-05-13 11:48     ` Matthieu Moy
2010-05-13 17:31       ` Avery Pennarun
2010-05-19  0:37     ` Anthony W. Youngman
2010-05-19  1:12       ` Avery Pennarun
2010-05-13 11:42   ` Matthieu Moy
2010-05-13 11:51     ` Jeff King
2010-05-13 18:20 ` Martin Langhoff

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=201005130018.o4D0I7iI079145@kzsu.stanford.edu \
    --to=doom@kzsu.stanford.edu \
    --cc=git@vger.kernel.org \
    --cc=noah@smartmediacorp.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).