emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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
* MORE: Using git via USB for personal org dir and other data files
@ 2009-02-28  5:11 Alan E. Davis
  2009-02-28 13:32 ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Alan E. Davis @ 2009-02-28  5:11 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist


[-- Attachment #1.1: Type: text/plain, Size: 2765 bytes --]

Regarding the synchronizing of directories on two or more machines, using a
USB Stick.  Further questions after a bit of experimentation.

I am currently keeping two workstations up to date via a USB flash drive,
and have had, variously, both good and bad luck. Here are some questions:

1.  I understand the idea, finally, of using a "bare" repo on the fiash
drive, at least in part.  But what will I do if the bare repo fails to merge
because two versions are pushed or pulled to it from the two machines, of a
file.  I've wasted a bit of time and now have gotten "meld" installed as the
mergetool.  Still, sometimes even that doesn't work.  Today I have two flash
drives in use, one that was working fine to update from one machine, but
won't even accept a file from the other.  I have clumsily deleted the old
version from the USB drive, and copied over the other version, done git rm
<oldfile> git add <file> and git commit -a, but the file refuses to
install.  I'm not going to ask this as a primary question, because I think I
need to just understand the underlying idea of using a bare repo, and not
editing it at all.

2.  I have had poor luck with push.

3.  For this simple usage, is it even useful to think about branches, and if
so, how should branches be used?

4.  Is it wiser to fetch than to pull?  I have seen this suggested, but
don't understand the use of fetch.


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 ?

Well, perhaps this is enough confusion for now.  Thanks for all the
suggestions on this list.  I think it's going to work, and I'll expand this
to other directories as well.

Alan


-- 
Alan Davis

It is undesirable to believe a proposition when
there is no ground whatsoever for supposing it is true.
    ---- Bertrand Russell
They are ill discoverers that think there is no land, when they can see
nothing but sea.
    ----   Sir Francis Bacon

[-- Attachment #1.2: Type: text/html, Size: 3035 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ 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).