emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Richard Riley <rileyrg@googlemail.com>
Cc: Richard Riley <rileyrgdev@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: org-mode tutorial questionaire
Date: Wed, 24 Mar 2010 07:53:30 -0400	[thread overview]
Message-ID: <87bpee0wcl.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <drfx3q8c2f.fsf@news.eternal-september.org> (Richard Riley's message of "Wed\, 24 Mar 2010 07\:32\:08 +0100")

Richard Riley <rileyrg@googlemail.com> writes:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> Richard Riley <rileyrgdev@gmail.com> writes:
>>
>> I keep my ~/.emacs -> ~/git/emacs/emacs.el and ~/git/emacs/custom.el
>> files in a git repository (~/git/emacs) so I can commit changes to these
>> files and add meaningful comments about the reason for the change in the
>> commit message.  This lets me easily experiment with changing half a
>> dozen variables and not worrying about remembering the old values in
>> case I want to go back.  Git has the information and it's easy to
>> restore the old values for any point in the git history.  This also lets
>> me synchronize variable changes to my laptop so my on-the-road org-mode
>> setup is identical to my workstation.
>>
>
> As a side note to this is for those not familiar with git, its pretty
> simple to manage a remote git repo using ssh. When on the road or
> dealing with multiple PCs around the "globe" (!) this can be priceless.
>
> I maintain my own "sparse" repo on my mail server machine. Whenever I
> update my ~/.emacs.d/emacs-init.org file or my custom.el in the same dir
> I push it to the remote shh repo too. Handy as to then sync my laptop or
> the machine at work.
>
> Needless to say, all my org-files are in there too.
>
> The only thing that still taxes my pickled brain is when I need to
> merge. The git terminology for fast forwards etc confuses me each  and
> every time ;)

Hi Richard,

I use a script for keeping my git repositories up to date on multiple
machines.  The source is posted here:
http://doc.norang.ca/org-mode.html#git-sync

This script makes a few assumptions about my repositories
  - All repositories have a remote 'norang' which is the bare repository
    I push to and fetch from
  - All repositories live in a known place (~/git for me)
    (I have subdirectories under ~/git for grouping repositories
    together and the script finds every repository by looking for the
    .git directory)

You can change both of these locations at the top of the script.

git-sync finds each repository on the system you run it from and
synchronizes multiple branches in each repositories with the remote.  It
figures out if the branch can be moved (due to a fast-forward) and moves
those refs automatically for all branches in the repository.  The only
time you need to manually do something is if you need a merge because
you modified the same branch on two machines without pushing the changes
to the bare repository.

This works great for me (I keep over 30 repositories in sync with my
laptop -- I thought I had 35 repositories I manage this way so just for
fun I decided to count them and there are 73!).  I don't need to think
about what changed, I just hack and commit and run git-sync before I
switch machines.  Any branch that has been pushed to the remote will be
synchronized by the script and local branches that exist only in the
working repository are ignored.

HTH,
Bernt

  reply	other threads:[~2010-03-24 11:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 18:02 org-mode tutorial questionaire Alexander Poslavsky
2010-03-23 19:42 ` Matt Lundin
2010-03-23 20:04   ` Alexander Poslavsky
2010-03-23 20:50     ` Friedrich Delgado Friedrichs
2010-03-23 21:43       ` David Maus
2010-03-23 22:00         ` Alexander Poslavsky
2010-03-23 22:04       ` Thomas S. Dye
2010-03-23 23:46     ` Matt Lundin
2010-03-24  2:30       ` Alexander Poslavsky
2010-03-23 20:47   ` Richard Riley
2010-03-24  2:31     ` Bernt Hansen
2010-03-24  6:32       ` Richard Riley
2010-03-24 11:53         ` Bernt Hansen [this message]
2010-03-24 12:36         ` Ian Barton
2010-03-25 17:57           ` Austin Frank
2010-03-27 11:32             ` Ian Barton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bpee0wcl.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=rileyrg@googlemail.com \
    --cc=rileyrgdev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).