{"thread":{"id":"20163","subject":"local configuration","startedAt":"2009-07-20T10:54:44Z","lastAt":"2009-07-22T01:21:47Z","messageCount":4,"participants":["Roald de Vries","Nicolas Sebrecht","Tim Visher","Ben Walton"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"118296","messageId":"33BF73EE-79AB-435F-B35F-E848DD1F3BF3@roalddevries.nl","threadId":"20163","inReplyTo":null,"subject":"local configuration","fromName":"Roald de Vries","fromEmail":"rdv@roalddevries.nl","sentAt":"2009-07-20T10:54:44Z","receivedAt":"2009-07-20T10:54:44Z","isPatch":false,"sender":{"key":"rdv@roalddevries.nl","avatar":null},"body":"Hi all,\n\nI want to use git to synchronize my bashrc's (and other configuration  \nfiles) between computers. These have common stuff in them, and stuff  \nthat's specific to a certain computer. The way I do it now is with a  \nbranch for each computer, and one common branch. Is this a known use  \ncase, am I misusing git, and is there a more elegant way to do this?\n\nThanks in advance for replies, kind regards, Roald\n"},{"id":"118299","messageId":"20090720114757.GA25657@vidovic","threadId":"20163","inReplyTo":"33BF73EE-79AB-435F-B35F-E848DD1F3BF3@roalddevries.nl","subject":"Re: local configuration","fromName":"Nicolas Sebrecht","fromEmail":"nicolas.s.dev@gmx.fr","sentAt":"2009-07-20T11:47:57Z","receivedAt":"2009-07-20T11:47:57Z","isPatch":false,"sender":{"key":"nicolas.s.dev@gmx.fr","avatar":null},"body":"The 20/07/09, Roald de Vries wrote:\n\n> I want to use git to synchronize my bashrc's (and other configuration  \n> files) between computers. These have common stuff in them, and stuff  \n> that's specific to a certain computer. The way I do it now is with a  \n> branch for each computer, and one common branch. Is this a known use  \n> case, am I misusing git, and is there a more elegant way to do this?\n\nI try to write my conf files as portable as possible. Today, I don't\nneed dedicated branches but that's the way I would achieve it.\n\n-- \nNicolas Sebrecht\n"},{"id":"118301","messageId":"c115fd3c0907200456m479bc762w91b4a6e0d580e9ac@mail.gmail.com","threadId":"20163","inReplyTo":"33BF73EE-79AB-435F-B35F-E848DD1F3BF3@roalddevries.nl","subject":"Re: local configuration","fromName":"Tim Visher","fromEmail":"tim.visher@gmail.com","sentAt":"2009-07-20T11:56:29Z","receivedAt":"2009-07-20T11:56:29Z","isPatch":false,"sender":{"key":"tim.visher@gmail.com","avatar":"https://gravatar.com/avatar/98307ce54bcac1a46b5d845827d5386e2a27895ff08790cdd3877ad527760575?d=mp&s=160"},"body":"Hi Roald,\n\nOn Mon, Jul 20, 2009 at 6:54 AM, Roald de Vries<rdv@roalddevries.nl> wrote:\n> I want to use git to synchronize my bashrc's (and other configuration files)\n> between computers. These have common stuff in them, and stuff that's\n> specific to a certain computer. The way I do it now is with a branch for\n> each computer, and one common branch. Is this a known use case, am I\n> misusing git, and is there a more elegant way to do this?\n\nI'm using git for the same purpose.  I don't think you're going to\nfind anyone who will get too dogmatic here and say there are any\nuniversally wrong ways to use git.  If it works for you, you should\nprobably just keep doing it.  However, I could tell you what I'm\ndoing.\n\nI use git to manage both my bash config files (.bashrc, .inputrc,\n.bash_profile) and my .emacs file (a tree .emacs.d).  I manage these\nfiles for use on a Mac and a Windows Box running Cygwin.  What I've\ndone is I keep all common configuration items in one git repo with a\nsingle branch.  If I'm working on something really large that will be\nbroken for awhile, which is rare, then I'll branch out and go back to\nstable when I'm done working for the day.  Once it's done, obviously,\nI merge it back in and delete the branch.  Obviously, though, there is\nconfiguration that only belongs on one box or the other.  For those, I\nhave files that lie outside of my current repo that I call out to.  I\nput them in the same relative locations on either box (obviously, Bash\nworks the same on Cygwin and the Mac) and so my really local\nconfiguration lives on unbeknownst to my repo.  If I can't locate that\nfile outside of the repo (for instance, Emacs Easy Configuration file)\nthen I use the .gitignore file to keep it out of my hair if there are\nitems local to the box I'm on.\n\nThat then begs the question of how to track the local files.  You can\nalways make a new git repo.  That's easiest to do if the files are\noutside of the current repo because you can just make a new repo.  If\nthe file has to reside in the common repo, then it's a little more\ncomplicated.  You may be able to use sub-repos combined with\n.gitignore files?  I haven't had occasion to work this out yet.\n\nHope that gives you some food for thought.  Again, it's just how I\nhappen to do things.  Your approach sounds just as good to me.\n\n/me shrugs.\n\n-- \n\nIn Christ,\n\nTimmy V.\n\nhttp://burningones.com/\nhttp://five.sentenc.es/ - Spend less time on e-mail\n"},{"id":"118440","messageId":"1248225511-sup-7422@ntdws12.chass.utoronto.ca","threadId":"20163","inReplyTo":"20090720114757.GA25657@vidovic","subject":"Re: local configuration","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2009-07-22T01:21:47Z","receivedAt":"2009-07-22T01:21:47Z","isPatch":false,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Excerpts from Nicolas Sebrecht's message of Mon Jul 20 07:47:57 -0400 2009:\n> I try to write my conf files as portable as possible. Today, I don't\n> need dedicated branches but that's the way I would achieve it.\n\nI store all of my config in a single tree and have bash or emacs\nsource files selectively after detecting various useful attributes of\nthe system.  For bash, this includes platform, 'domain' (site) and\nmachine.  For emacs, this includes version, flavour, etc.  It makes\nfor a bigger tree, but I can store it all easily and check it out\nanywhere.\n\n-Ben\n-- \nBen Walton\nSystems Programmer - CHASS\nUniversity of Toronto\nC:416.407.5610 | W:416.978.4302\n\nGPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu\nContact me to arrange for a CAcert assurance meeting.\n"}]}