emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] MORE: Using git via USB for personal org dir and other dat


From: Ian Barton
Subject: Re: [Orgmode] MORE: Using git via USB for personal org dir and other data files
Date: Sat, 28 Feb 2009 11:58:14 +0000
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Here is a rough idea of what I think I need to do now. Please comment on any ommissions or problems:

At home, on my primarly workstation:
1. cd to a directory with a good tree (perhaps ~/org) already under git control. 2. insert the USB drive (I have a label "BLUE" on my usb drive. On my gnome/ubuntu box, it automounts as /media/BLUE)
3. git clone --bare . /media/BLUE/org.git
4. git remote add BLUE /media/BLUE/org.git
5. ??  git push BLUE (master?)

Now at work, I am on the other workstation:
1. git clone /media/BLUE/org.git
2. can I now do this?: git remote add BLUE /media/BLUE/org.git
2. work
3. git push BLUE ???
4.

Back at home
1. git fetch BLUE ??  or git pull BLUE ??



I am confused at a couple of points here. Much of the above I have gleaned from three posts by Bernt Hansen. Other sources on line include some postings on the very problem of syncing machines using git.
Can I pull from /media/BLUE/org.git ?

Alan,

Not being a regular git user, I can't help directly with which commands you need to use. However, you might find http://www.netsplit.com/2009/02/23/revision-control-systems-suck/ entertaining.

If you have a git repo that contains a "correct" working version, I would suggest that you start from scratch with that. As Bernt suggested you should create a repo with no working trees on your usb stick. This will just contain the repo i.e. .git and nothing else.

In bzr you can use push to update your repo on the USB stick, so the .git contains all your changes. Note this only updates the repo, you won't see any of your files in the directory on the usb stick containing the repo (they are all in the .git repo).

I think that part of the proble is that push in git doesn't work like you might expect (see the ranting link above). You may need to use got clone the first time you edn your changes, after that I think push should work.

Take your usb stick to Machine B and create a working branch from your usb stick.

In bzr this would be something like:

bzr branch /media/usbstick/my_git_repo/ ~/Documents/org

In git I think you need to use clone, with a similar syntax

This would create a working copy in ~/Documents/org. Note that bzr would want to create the org directory, so whatever target directory you choose shouldn't exist initially.

You can then work on your org files on Computer B and do a git commit when you have finished. In bzr a simple bzr push would update the repo on your usb stick and I think that got works the same way.

You can then take your usb stick to Computer A and do a git pull to get your changes. When you have finished working on Computer A doing a git commit and a git push should update the repo on the usb stick.

I have almost finished an article on how I use bzr to keep my org files in sync. I am aware that most people using org probably use git, so I have been trying to give my examples using both bzr and git. However, I too find some aspects of git confusing.

If we can sort out the correct way to use git, I promise to finish my article and send it to worg!

Ian.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]