[Top][All Lists]

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

[Orgmode] Re: org-mode tutorial questionaire

From: Bernt Hansen
Subject: [Orgmode] Re: org-mode tutorial questionaire
Date: Wed, 24 Mar 2010 07:53:30 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Richard Riley <address@hidden> writes:

> Bernt Hansen <address@hidden> writes:
>> Richard Riley <address@hidden> 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:

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.


reply via email to

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