From: Tim Visher <tim.visher@gmail.com>
To: Roald de Vries <rdv@roalddevries.nl>
Cc: git@vger.kernel.org
Subject: Re: local configuration
Date: Mon, 20 Jul 2009 07:56:29 -0400 [thread overview]
Message-ID: <c115fd3c0907200456m479bc762w91b4a6e0d580e9ac@mail.gmail.com> (raw)
In-Reply-To: <33BF73EE-79AB-435F-B35F-E848DD1F3BF3@roalddevries.nl>
Hi Roald,
On Mon, Jul 20, 2009 at 6:54 AM, Roald de Vries<rdv@roalddevries.nl> wrote:
> I want to use git to synchronize my bashrc's (and other configuration files)
> between computers. These have common stuff in them, and stuff that's
> specific to a certain computer. The way I do it now is with a branch for
> each computer, and one common branch. Is this a known use case, am I
> misusing git, and is there a more elegant way to do this?
I'm using git for the same purpose. I don't think you're going to
find anyone who will get too dogmatic here and say there are any
universally wrong ways to use git. If it works for you, you should
probably just keep doing it. However, I could tell you what I'm
doing.
I use git to manage both my bash config files (.bashrc, .inputrc,
.bash_profile) and my .emacs file (a tree .emacs.d). I manage these
files for use on a Mac and a Windows Box running Cygwin. What I've
done is I keep all common configuration items in one git repo with a
single branch. If I'm working on something really large that will be
broken for awhile, which is rare, then I'll branch out and go back to
stable when I'm done working for the day. Once it's done, obviously,
I merge it back in and delete the branch. Obviously, though, there is
configuration that only belongs on one box or the other. For those, I
have files that lie outside of my current repo that I call out to. I
put them in the same relative locations on either box (obviously, Bash
works the same on Cygwin and the Mac) and so my really local
configuration lives on unbeknownst to my repo. If I can't locate that
file outside of the repo (for instance, Emacs Easy Configuration file)
then I use the .gitignore file to keep it out of my hair if there are
items local to the box I'm on.
That then begs the question of how to track the local files. You can
always make a new git repo. That's easiest to do if the files are
outside of the current repo because you can just make a new repo. If
the file has to reside in the common repo, then it's a little more
complicated. You may be able to use sub-repos combined with
.gitignore files? I haven't had occasion to work this out yet.
Hope that gives you some food for thought. Again, it's just how I
happen to do things. Your approach sounds just as good to me.
/me shrugs.
--
In Christ,
Timmy V.
http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail
prev parent reply other threads:[~2009-07-20 11:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 10:54 local configuration Roald de Vries
2009-07-20 11:47 ` Nicolas Sebrecht
2009-07-22 1:21 ` Ben Walton
2009-07-20 11:56 ` Tim Visher [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c115fd3c0907200456m479bc762w91b4a6e0d580e9ac@mail.gmail.com \
--to=tim.visher@gmail.com \
--cc=git@vger.kernel.org \
--cc=rdv@roalddevries.nl \
/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.
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 NNTP newsgroup(s).