[Orgmode] Re: Using Git to update more than one machine (one without net

From:

Bernt Hansen

Subject:

[Orgmode] Re: Using Git to update more than one machine (one without network access)

Date:

Wed, 25 Feb 2009 13:41:25 -0500

User-agent:

Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Paul Mead <address@hidden> writes:
> Ian Barton <lists <at> manor-farm.org> writes:
>
>>
>> Use git clone to create a repo on your usb stick.
>>
>> Pull changes from Carsten' git repo to your usb stick.
>>
>> Pull changes from your usb stick to both your work and home computers.
>> In other words your usb stick is your own master repo.
>>
>
> It works! Well, in the ansence of any changes to pull it seems to work anyway.
Hi Paul,
I suggest you put bare repositories on the USB stick.
On your home machine that has internet access
$ git pull # to update from git.or.cz
Create a bare clone (once) of your repo on the usb stick
$ git clone --bare . /path/to/usb/org-mode.git
Define a remote repo on the USB stick
$ git remote add usb /path/to/usb/org-mode.git
$ git push usb [master and any other branches you want]
After that you can
$ git fetch usb on your workstation to update any new commits on the
usb stick
$ git push # update any existing branches on the usb stick
On your work machine just clone the USB repo
$ git clone /path/to/usb/org-mode.git
and you should be all set.
I have all my active repos as bare clones on my 4GB USB stick including
git.git, org-mode.git, my org files, and a bunch of other projects - so
when I'm leaving I grab my laptop, load the USB stick from my
workstation with a script (usb-git-push) and then walk out the door with
my laptop and my USB stick.
I can pull from the USB stick into my laptop after I'm gone.
Synching the other way is similar. On the laptop push to the USB stick,
take the stick to my workstation and git fetch from it. Then I merge
the usb/master and master (and other topic branches) appropriately.
HTH,
Bernt