From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alan E. Davis" Subject: MORE: Using git via USB for personal org dir and other data files Date: Sat, 28 Feb 2009 15:11:59 +1000 Message-ID: <7bef1f890902272111l7611d157k984ca50251f20df6@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0052573243==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LdHUa-0004iz-Bz for emacs-orgmode@gnu.org; Sat, 28 Feb 2009 00:12:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LdHUZ-0004iO-Av for emacs-orgmode@gnu.org; Sat, 28 Feb 2009 00:12:04 -0500 Received: from [199.232.76.173] (port=44496 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdHUZ-0004iL-6y for emacs-orgmode@gnu.org; Sat, 28 Feb 2009 00:12:03 -0500 Received: from wf-out-1314.google.com ([209.85.200.173]:20953) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LdHUY-0007kV-Oe for emacs-orgmode@gnu.org; Sat, 28 Feb 2009 00:12:03 -0500 Received: by wf-out-1314.google.com with SMTP id 28so1537911wfc.24 for ; Fri, 27 Feb 2009 21:11:59 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode Mailinglist --===============0052573243== Content-Type: multipart/alternative; boundary=001636e90cdc0825580463f3a0cc --001636e90cdc0825580463f3a0cc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 git add 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 --001636e90cdc0825580463f3a0cc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Regarding the synchronizing of directories on two or more machines, using a= USB Stick.=A0 Further questions after a bit of experimentation.=A0
=A0=
I am currently keeping two workstations up to date via a USB flash driv= e, and have had, variously, both good and bad luck. Here are some questions= :

1.=A0 I understand the idea, finally, of using a "bare" repo = on the fiash drive, at least in part.=A0 But what will I do if the bare rep= o fails to merge because two versions are pushed or pulled to it from the t= wo machines, of a file.=A0 I've wasted a bit of time and now have gotte= n "meld" installed as the mergetool.=A0 Still, sometimes even tha= t doesn't work.=A0 Today I have two flash drives in use, one that was w= orking fine to update from one machine, but won't even accept a file fr= om the other.=A0 I have clumsily deleted the old version from the USB drive= , and copied over the other version, done git rm <oldfile> git add &l= t;file> and git commit -a, but the file refuses to install.=A0 I'm n= ot 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.=A0

2.=A0 I have had poor luck with push.

3.=A0 For this simple usa= ge, is it even useful to think about branches, and if so, how should branch= es be used?

4.=A0 Is it wiser to fetch than to pull?=A0 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.=A0 Please co= mment on any ommissions or problems:

At home, on my primarly worksta= tion:
1. cd to a directory with a good tree (perhaps ~/org) already unde= r git control.
2. insert the USB drive (I have a label "BLUE" on my usb drive.= =A0 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. ??=A0 git push BLUE (master?)

Now at work, I am on the other work= station:
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 ??=A0 or git pull BLUE ??
<= br>

I am confused at a couple of points here.=A0

Much of the= above I have gleaned from three posts by Bernt Hansen.=A0 Other sources on= line include some postings on the very problem of syncing machines using g= it.=A0

Can I pull from /media/BLUE/org.git ?

Well, perhaps this is enou= gh confusion for now.=A0 Thanks for all the suggestions on this list.=A0 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 tr= ue.
=A0 =A0 ---- Bertrand Russell
They are ill discoverers that thi= nk there is no land, when they can see nothing but sea.
=A0 =A0 ---- =A0 Sir Francis Bacon

--001636e90cdc0825580463f3a0cc-- --===============0052573243== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============0052573243==--