On 03/28/2013 11:33 AM, John McKown wrote:
I do that, partially at least. I track the files in /etc. But I generally only do it after I do a yum upgrade. All I do is:


cd /etc
sudo git init #well, only the first time
sudo git add -A .
sudo git commit -m "commit message"

You could just get in the habit of doing the last two every time you modify anything in the /etc subdirectory hierarchy.

I also do multi-machine tracking. Similar to:

#logon to git global repository machine as root
cd /global/repositories/git
git init --bare configurations.git

On each machine do the following as root

#to start up:
cd /etc
git init
git remote add origin ssh://user@global/global/repositories/git/configurations.git
git checkout -b $(hostname)
git add -A .
git commit -m "commit message"
git push --all
git remote set-branches --add origin other-host-1 other-host-2 ...
git fetch



When I want to compare two machine, I log on to one and do:

cd /etc
git fetch
git diff HEAD other-host

Where "other-host" is the branch name (hostname) of the second host. I often use the --stat for a smaller output if I only want to know the names of the differing files and not the actual differences.

If you have multiple hosts, you can do all the compares on a given host by doing the "git fetch" and then do:

git diff host1 host2

because the branch name for the files on host1 is host1 and is host2 for host2.

When you set up another host, you will need to do the above, then do a "git remote set-branches --add origin new-host" on every other host so that a "git fetch" on those hosts will pick up the new host.

Oh, I you only want to do the compares on a specific host, then you can do the "get remote set-branches" just on that specific host.

Don't know if this is of any help to you or not. I hope it made some sense.



On Thu, Mar 28, 2013 at 12:22 PM, Dale R. Worley <wor...@alum.mit.edu <mailto:wor...@alum.mit.edu>> wrote:

    I'm considering using Git to track the customizations I make to the
    system files of my Linux box.  Has anyone done that and has hints on
    how to make it work well?

    Actually, I have two Linux boxes, and I need to track both sets of
    customizations.  It looks easy enough to have one repository on each,
    and each has a tracking branch for the other repository.  But I'm not
    clear on how to do the bookkeeping for cross-merging customizations
    that are first inserted on one machine to the other.  I have a feeling
    that I want something that tracks which deltas from one lineage have
    been merged into the other lineage, along the lines of the bookkeeping
    that "svn merge" does.

    Dale

    Dale Worley
    --
    Morning amnesia -- Nature's way of keeping you from waking up
    screaming.
    -- "Dilbert"

    --
    You received this message because you are subscribed to the Google
    Groups "Git for human beings" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to git-users+unsubscr...@googlegroups.com
    <mailto:git-users%2bunsubscr...@googlegroups.com>.
    For more options, visit https://groups.google.com/groups/opt_out.





--
This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you?

Maranatha! <><
John McKown
--
You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


There is also this project on github:
https://github.com/bup/bup

I haven't used it, but it looks like it has some promise.

Bryce


--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to