* local configuration
@ 2009-07-20 10:54 Roald de Vries
2009-07-20 11:47 ` Nicolas Sebrecht
2009-07-20 11:56 ` Tim Visher
0 siblings, 2 replies; 4+ messages in thread
From: Roald de Vries @ 2009-07-20 10:54 UTC (permalink / raw)
To: git
Hi all,
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?
Thanks in advance for replies, kind regards, Roald
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: local configuration
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
1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Sebrecht @ 2009-07-20 11:47 UTC (permalink / raw)
To: Roald de Vries; +Cc: git
The 20/07/09, Roald de Vries 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 try to write my conf files as portable as possible. Today, I don't
need dedicated branches but that's the way I would achieve it.
--
Nicolas Sebrecht
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: local configuration
2009-07-20 10:54 local configuration Roald de Vries
2009-07-20 11:47 ` Nicolas Sebrecht
@ 2009-07-20 11:56 ` Tim Visher
1 sibling, 0 replies; 4+ messages in thread
From: Tim Visher @ 2009-07-20 11:56 UTC (permalink / raw)
To: Roald de Vries; +Cc: git
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: local configuration
2009-07-20 11:47 ` Nicolas Sebrecht
@ 2009-07-22 1:21 ` Ben Walton
0 siblings, 0 replies; 4+ messages in thread
From: Ben Walton @ 2009-07-22 1:21 UTC (permalink / raw)
To: Roald de Vries, git
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
Excerpts from Nicolas Sebrecht's message of Mon Jul 20 07:47:57 -0400 2009:
> I try to write my conf files as portable as possible. Today, I don't
> need dedicated branches but that's the way I would achieve it.
I store all of my config in a single tree and have bash or emacs
source files selectively after detecting various useful attributes of
the system. For bash, this includes platform, 'domain' (site) and
machine. For emacs, this includes version, flavour, etc. It makes
for a bigger tree, but I can store it all easily and check it out
anywhere.
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-22 1:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).