* Re: Re: MORE: Using git via USB for personal org dir and other data files
2009-02-28 13:32 ` Bernt Hansen
@ 2009-02-28 20:00 ` Sebastian Rose
2009-02-28 20:01 ` Bernt Hansen
0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Rose @ 2009-02-28 20:00 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode Mailinglist
Bernt Hansen <bernt@norang.ca> writes:
> Hi Alan,
>
> The best way to test drive all this stuff is just make some throw away
> repos to play with.
>
> $ mkdir /tmp/junk
> $ cd /path/to/your/org/git/repo
> $ git clone --bare . /tmp/junk/org.git
> $ cd /tmp/junk
> $ git clone org.git home
> $ git clone org.git work
>
> Now you have 3 repos in /tmp/junk
> work - pretends to be your repo at work
> home - pretends to be your repo at home
> org.git - your bare repo on the usb stick
I'll stay with monotone for this exact reason and purpos. It's great
with USB, FAT and so on. No mess since three years now and it has the
best of all user interfaces.
So here, again, my monotone advertising:
No thinking and reading and asking and than again reading... - just
using. That's what a SCMS is for. The docs (just one PDF) will get you
started after 10 minutes and you'll only have refer to the docs in very
rare cases in the future because of mtns UI.
You'll not even have to add your key file to ssh-agent by hand -
monotone does that for you once it knows about it. Don't add something -
just commit...
I only use git with servers on the net, where it plays great. Also, the
`git gui' is one of the best GUIs for RCSs around.
For the USB stick case, it's worth to mention, that monotone needs no
.mtn-ignore file, just to know, that *~ files have to be
ignored. Permissions are handled (even if the stick is FAT formated) as
well as empty directories. Simply the best designed RCS around IMHO. No
need to say, that monotone handles copys and renames (with history).
USB:
$ cd org/
$ mtn -d /path/to/desired/localdb db init
$ touch file.c
$ mtn add file.c
$ mtn commit -m'message'
Now the USB:
$ cp /path/to/desired/localdb /media/BLUE
That's all.
The first time we sync with /media/BLUE/database, we tell monotone, to
use this repo as the default. No fiddling with `remotes', `origin'...
$ mtn sync --set-default /media/BLUE/localdb
Bang - you're done once for ever.
# On the other computer:
$ cp /media/BLUE/localdb /path/to/desired/localdb
$ mtn -d /path/to/desired/localdb co org
$ cd org
# edit add and so on
$ mtn commit -m'message'
$ mtn sync --set-default /media/BLUE/localdb
Later on just call
$ mtn sync
Databases are small (in my tests _much_ smaller than git or mercurial
repos), can even be accessed using SQL (it's a sqlite database) and
extend it's functionality through LUA (per workspace), trust is managed
per workspace...
One feature I like with monotone is the _MTN/log file. You may gather
commit messages while working, which makes it realy easy to document
your work in great detail and keeps you documenting them. Never forget
to document a change or the reason for it anymore. There's a little
elisp file I wrote make `add-change-log-entry' search for _MTN/log and
use it. I've bound `mtn-add-change-log-entry' to F8 (see
http://www.emacswiki.org/cgi-bin/emacs/sr-monotone.el).
I even use monotone and git in conjunction a lot. Monotone for USB, git
for the servers (since I have to). While git has great features, those
are not what I need for my workflow.
git always throws warnings and errors here, when I try to `git clone
--bare' on FAT formated USB sticks (didn't try with the new 1.6.1.3
version, that's in Debian testing since a week).
Regards,
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Http: www.emma-stil.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: MORE: Using git via USB for personal org dir and other data files
2009-02-28 20:00 ` Sebastian Rose
@ 2009-02-28 20:01 ` Bernt Hansen
2009-02-28 22:07 ` Sebastian Rose
0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2009-02-28 20:01 UTC (permalink / raw)
To: Sebastian Rose; +Cc: emacs-orgmode Mailinglist
Sebastian Rose <sebastian_rose@gmx.de> writes:
> git always throws warnings and errors here, when I try to `git clone
> --bare' on FAT formated USB sticks (didn't try with the new 1.6.1.3
> version, that's in Debian testing since a week).
The only issue I ran into was when I mounted the USB stick with Linux's
default options. I need to specify the option shortname=mixed so that
it doesn't create 'head' instead of 'HEAD' in the repo on the USB stick.
,----[ part of my /etc/fstab ]
| /dev/sdb1 /usb vfat defaults,user,noauto,shortname=mixed 0 0
`----
After that everything worked great for me.
-Bernt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: MORE: Using git via USB for personal org dir and other data files
2009-02-28 20:01 ` Bernt Hansen
@ 2009-02-28 22:07 ` Sebastian Rose
2009-03-01 1:10 ` Sebastian Rose
0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Rose @ 2009-02-28 22:07 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode Mailinglist
Bernt Hansen <bernt@norang.ca> writes:
> Sebastian Rose <sebastian_rose@gmx.de> writes:
>
>> git always throws warnings and errors here, when I try to `git clone
>> --bare' on FAT formated USB sticks (didn't try with the new 1.6.1.3
>> version, that's in Debian testing since a week).
>
> The only issue I ran into was when I mounted the USB stick with Linux's
> default options. I need to specify the option shortname=mixed so that
> it doesn't create 'head' instead of 'HEAD' in the repo on the USB stick.
Aaaahaaa, Bernt is our git god :) That's exactly the reason for failing
to create repos it seems. I remember, it head to do with `HEAD'!
Thanks a lot. Now I only have to find out how to add that option to a
modern system, that uses no fstab for USB devices. Google should shed
light on this quickly.
Even if I like monotone, I still don't like to use two systems for one
project. Now I can use git for git projects, which is nice.
Thanks Bernt!
> ,----[ part of my /etc/fstab ]
> | /dev/sdb1 /usb vfat defaults,user,noauto,shortname=mixed 0 0
> `----
>
> After that everything worked great for me.
>
> -Bernt
>
This was one of those days I learned more on the emacs-orgmode
mailinglist, than in `real' life :) where I met no unicorn again.
Regards,
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Http: www.emma-stil.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: MORE: Using git via USB for personal org dir and other data files
2009-02-28 22:07 ` Sebastian Rose
@ 2009-03-01 1:10 ` Sebastian Rose
[not found] ` <7bef1f890902281810n1ccda333yada4e62082bd92c8@mail.gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Rose @ 2009-03-01 1:10 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode Mailinglist
>> ,----[ part of my /etc/fstab ]
>> | /dev/sdb1 /usb vfat defaults,user,noauto,shortname=mixed 0 0
>> `----
>>
>> After that everything worked great for me.
>>
>> -Bernt
>>
>
> This was one of those days I learned more on the emacs-orgmode
> mailinglist, than in `real' life :) where I met no unicorn again.
Start gconf-editor and navigate to
system->storage->default_options->vfat
edit the key 'mount_options' and change it's value to:
[shortname=mixed,uid=]
That's it.
Now, indeed,
git clone -l --no-hardlinks --bare org/ /media/BLUE/git/org
works like a charm.
Thanks again Bernt!
Best,
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Http: www.emma-stil.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: MORE: Using git via USB for personal org dir and other data files
2009-03-01 4:10 ` Bernt Hansen
@ 2009-03-01 15:07 ` Sebastian Rose
0 siblings, 0 replies; 7+ messages in thread
From: Sebastian Rose @ 2009-03-01 15:07 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode Mailinglist
Bernt Hansen <bernt@norang.ca> writes:
>> $ git clone -l --no-hardlinks --bare . /path/to/usb/stick
>
> I've never used -l --no-hardlinks when creating repos on my usb stuck.
> vfat filesystems don't support hard links and you can't make use of
> hard links across filesystems.
That's true :)
I just copy this from my every-day-git.org. Everything I don't work on
anymore goes there to keep the number of workspaces at a minimum. I tend
to start a lot of little projects as test balloons (or just out of
curiousity) and keep them for reference. I'm always afraid to lose some
trick I found and that does not make it into one of my real projects :)
But even then, --no-hardlinks is not needed. It's a bad habbit even, since
I waste disk space that way. Removing .git in my workspace will never
remove any of the cloned (local, on same filesystem) repos, since files
_are_ hard links, and the data is reachable as long, as at least one
hard link exists (that's the difference between hard links and symbolic
links).
At least that's how I understand hard links on Linux.
`du' does take that into account:
$ mkdir test
$ cd test
$ touch file.c
$ cat /some/file > link.c
$ du -h
16K .
$ ln file.c link.c
$ du -h
16K .
$ ln link.c link2.c
$ du -h
16K .
$ ls -l
insgesamt 36
-rw-r--r-- 3 sebastian sebastian 8988 1. Mär 16:02 file.c
-rw-r--r-- 3 sebastian sebastian 8988 1. Mär 16:02 link2.c
-rw-r--r-- 3 sebastian sebastian 8988 1. Mär 16:02 link.c
No matter how many hard links I add: the disk usage stays the
same. One more point for git!
OK, I'll adjust my habbits :)
Best,
--
Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover
Tel.: +49 (0)511 - 36 58 472
Fax: +49 (0)1805 - 233633 - 11044
mobil: +49 (0)173 - 83 93 417
Http: www.emma-stil.de
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: MORE: Using git via USB for personal org dir and other data files
@ 2009-03-02 13:54 Alan
2009-03-02 15:28 ` Bernt Hansen
0 siblings, 1 reply; 7+ messages in thread
From: Alan @ 2009-03-02 13:54 UTC (permalink / raw)
To: Bernt Hansen, Sebastian Rose; +Cc: emacs-orgmode Mailinglist
[Thank you to Bernt for the *clear* explanation of using branches!]
I seem to be moving out of the woods with this, and for the most
part, the experiment has been going smoothly. However, I've run
afoul of permissions, a bugaboo that was mentioned in an earlier
post on this topic.
I established a bare git repo on the USB drive, from a reasonably
clean tree. Pushing changes went well later on.
I cloned this repo onto the second machine, edited quite a bit,
but was dismayed when I tried to push: an error message
indicated that some file couldn't be written. So far, the
problem seems to be permissions. Preliminary checking shows that
the group and user IDs are numerical on the flash drive,
corresponding to the ID of the user who originally cloned the
repo.
I have a tentative plan of action, but I know nothing about the
use of permissions with git.
1. I have established a group "git" with a high group number,
so I can set create the same group on the work machine,
with the same group number. (I think it's too complicated
to change user numbers at this point). My users on the two
machine have different user names. It would be pretty
complicated right now to change the user's ID number.
2. I am setting the group permissions as read and write.
# chmod -R g+w /media/BLUE/org.git
3. Does this make sense?
This is a great thing. I want to put a whole bunch of work in such
a repo.
Thank you for the help.
Alan
--
Alan Davis
"An inviscid theory of flow renders the screw useless, but the need for
one non-existent."
---Lord Raleigh (John WilliamStrutt), or else his son, who was also a
scientist.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Re: MORE: Using git via USB for personal org dir and other data files
2009-03-02 13:54 Re: MORE: Using git via USB for personal org dir and other data files Alan
@ 2009-03-02 15:28 ` Bernt Hansen
0 siblings, 0 replies; 7+ messages in thread
From: Bernt Hansen @ 2009-03-02 15:28 UTC (permalink / raw)
To: Alan; +Cc: emacs-orgmode Mailinglist
Changing the permissions and using a group shouldn't be necessary.
If you're using Linux to mount the usb stick the 'user' option makes all
of the files on the drive owned by the person that mounts it.
,----[ /etc/fstab ]
| /dev/sdb1 /usb vfat defaults,user,noauto,shortname=mixed 0 0
`----
Then it just works :)
-Bernt
Alan <lngndvs@gmail.com> writes:
> [Thank you to Bernt for the *clear* explanation of using branches!]
>
> I seem to be moving out of the woods with this, and for the most
> part, the experiment has been going smoothly. However, I've run
> afoul of permissions, a bugaboo that was mentioned in an earlier
> post on this topic.
>
> I established a bare git repo on the USB drive, from a reasonably
> clean tree. Pushing changes went well later on.
>
> I cloned this repo onto the second machine, edited quite a bit,
> but was dismayed when I tried to push: an error message
> indicated that some file couldn't be written. So far, the
> problem seems to be permissions. Preliminary checking shows that
> the group and user IDs are numerical on the flash drive,
> corresponding to the ID of the user who originally cloned the
> repo.
>
> I have a tentative plan of action, but I know nothing about the
> use of permissions with git.
>
> 1. I have established a group "git" with a high group number,
> so I can set create the same group on the work machine,
> with the same group number. (I think it's too complicated
> to change user numbers at this point). My users on the two
> machine have different user names. It would be pretty
> complicated right now to change the user's ID number.
>
> 2. I am setting the group permissions as read and write.
>
> # chmod -R g+w /media/BLUE/org.git
>
> 3. Does this make sense?
>
>
> This is a great thing. I want to put a whole bunch of work in such
> a repo.
>
> Thank you for the help.
>
>
> Alan
>
>
> --
> Alan Davis
>
> "An inviscid theory of flow renders the screw useless, but the need for
> one non-existent."
> ---Lord Raleigh (John WilliamStrutt), or else his son, who was also a
> scientist.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-03-02 15:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-02 13:54 Re: MORE: Using git via USB for personal org dir and other data files Alan
2009-03-02 15:28 ` Bernt Hansen
-- strict thread matches above, loose matches on Subject: below --
2009-02-28 5:11 Alan E. Davis
2009-02-28 13:32 ` Bernt Hansen
2009-02-28 20:00 ` Sebastian Rose
2009-02-28 20:01 ` Bernt Hansen
2009-02-28 22:07 ` Sebastian Rose
2009-03-01 1:10 ` Sebastian Rose
[not found] ` <7bef1f890902281810n1ccda333yada4e62082bd92c8@mail.gmail.com>
[not found] ` <87zlg655pk.fsf@kassiopeya.MSHEIMNETZ>
[not found] ` <7bef1f890902281903xa296051xa844059dd4e392a7@mail.gmail.com>
2009-03-01 3:04 ` Alan E. Davis
2009-03-01 4:10 ` Bernt Hansen
2009-03-01 15:07 ` Sebastian Rose
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).