Ah. I see your point. I'm only on a few Linux instances at present, so one branch per instance is not a large concern. I may need to rethink if I end up on a lot of instances. Or I'll just keep most files in a common NFS mounted subdirectory and use git to source control the contents of that single subdirectory.
-- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * [email protected] * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM > -----Original Message----- > From: Linux on 390 Port [mailto:[email protected]] On Behalf Of > Jon Miller > Sent: Friday, November 02, 2012 9:54 AM > To: [email protected] > Subject: Re: Abuse of "git": stupid or wise "archive/backup" strategy? > > I like the idea of using git to manage your local files. I do the same > thing and use github for my remote repository. My biggest question for > you is how much value do you see in creating a separate branch (really > just a label in git) for each machine you have an account on? If I did > that, I would have hundreds and hundreds of branches and they'd > potentially lose some value. I guess I say "lose value" because I > personally use git to intentionally keep my dot-files and other home > directory contents the same vs. unique on each system. Another > colleague of mine will actually put into cron the set of commands "git > pull; git commit -a -m "Update from $(uname -n)"; git push". Works for > him whereas I'm a bit more deliberate with my commits. > > -- Jon Miller > > On Fri, Nov 2, 2012 at 10:03 AM, McKown, John > <[email protected] > > wrote: > > > Suppose I have a "personal" account on multiple Linux instances. Each > > account has a HOME subdirectory on a local filesystem. Each system > has > > an NFS mount to a shared disk. I have a read-write area on that disk. > > For the sake of argument, let's say that I access this NFS area via > > the path /nfs/server/me. What I have done in create a subdirectory on > > that path called "git", i.e. /nfs/server/me/git . Under the "git" > > subdirectory, I have created one subdirectory for each major > > subdirectory in my HOME. In particular, the ~/bin subdirectory. What > I > > have done is basically created /nfs/server/me/git/bin.git and did a > > "git --bare init" in it. Then, on each system, I basically did: > > > > cd > > mv bin bin-hold > > mkdir bin > > cd bin > > git init > > git remote add origin /nfs/server/me/git/bin.git echo "master" > > >version.txt git add . > > git commit -m "init master" > > git push --all > > git checkout -b $(hostname) > > mv ../bin-hold . > > hostname >|version.txt > > git add . > > git commit -m "init $(hostname)" > > git push --all > > > > Whenever I change a file, I do the three commands: "git add > > <filename>", "git commit -m '<reason>'", and "git push". This updates > > that system's branch in the shared git repository. > > > > What I have ended up with is /nfs/server/me/git/bin.git being an > > "archive/backup" of the files in ~/bin for each of my systems in > > /nfs/server/me/git/bin.git . Each system's archive is in a separate > branch. > > Now, I am thinking that because "git" uses the SHA-1 of a file as > it's > > identifier, that if I have an exact duplicate of a file in multiple > > systems, there is really only one physical copy in the > > /nfs/server/me/git/bin.git. True? Or am I'm confused? Also, if a new > > system is installed and I get my own HOME on it, then I can do a "git > > clone /nfs/server/me/git/bin.git" to setup that the ~/bin on that > > system. I would then do a "git checkout -b $(hostname)" to setup a > > branch for the new system (followed by a "hostname >|version.txt"; > > "git add version.txt"; "git commit -m "init $(hostname)" "; "git push > --all"). I can then "copy" > > another server's ~/bin by simply doing a "git pull origin/other- > server" > > while being in the current server's "branch". I can also use > something > > like "git fetch; git diff ..origin/other-server" to see what changes > > there are between the current server's ~/bin and any other server's > ~/bin. > > > > Does this sound reasonable? Or am I just being stupid because I > should > > be doing "..." (please specify a better alternative). > > > > Also note that I am considering extending this to an "external" > > archive on my home system, which is accessible via ssh. So I can set > > up the repository on the url of > > ssh://[email protected]:/some/path/git/bin.git . I do realize that > > our security people may have a concern about this, so it is only a > possibility. > > > > > > -- > > John McKown > > Systems Engineer IV > > IT > > > > Administrative Services Group > > > > HealthMarkets(r) > > > > 9151 Boulevard 26 * N. Richland Hills * TX 76010 > > (817) 255-3225 phone * > > [email protected] * www.HealthMarkets.com > > > > Confidentiality Notice: This e-mail message may contain confidential > > or proprietary information. If you are not the intended recipient, > > please contact the sender by reply e-mail and destroy all copies of > > the original message. HealthMarkets(r) is the brand name for products > > underwritten and issued by the insurance subsidiaries of > > HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), > > Mid-West National Life Insurance Company of TennesseeSM and The MEGA > > Life and Health Insurance Company.SM > > > > --------------------------------------------------------------------- > - > > For LINUX-390 subscribe / signoff / archive access instructions, send > > email to [email protected] with the message: INFO LINUX-390 or > > visit http://www.marist.edu/htbin/wlvindex?LINUX-390 > > --------------------------------------------------------------------- > - > > For more information on Linux on System z, visit > > http://wiki.linuxvm.org/ > > > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, send > email to [email protected] with the message: INFO LINUX-390 or > visit http://www.marist.edu/htbin/wlvindex?LINUX-390 > ---------------------------------------------------------------------- > For more information on Linux on System z, visit > http://wiki.linuxvm.org/ ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
