* Sharing home and etc files with git
@ 2008-06-05 20:01 iiijjjiii
2008-06-05 20:50 ` Miklos Vajna
2008-06-05 22:48 ` Kelvie Wong
0 siblings, 2 replies; 3+ messages in thread
From: iiijjjiii @ 2008-06-05 20:01 UTC (permalink / raw)
To: git
I would like to use git to keep revision histories of my home and etc
directories. I have several computers and I like to keep their
environments similar. I could see git pulls updating .bash_aliases,
.bashrc, and various bash and perl scripts I create in the home
directory, and updating /etc config files. Git pushes would share any
recent changes to other computers. This way no matter which computer I
am working on, the environment will be similar and I can make changes
and know they will be copied to the others.
I haven't figured out a good way to deal with the files that have local
settings in them. Using .gitignore feels a little overkill. Only certain
lines of the files need to be unique. Once they are set, I'd like
subsequent changes to be updated. I could cherry-pick manually but I'd
like a more automated method. I have read about etckeeper,
git-home-history and gibak, but they seem to be designed for backing up
and versioning files on one computer and not for sharing files.
Has anyone done something similar using git or is another tool more
suitable.
Thanks
jimk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Sharing home and etc files with git
2008-06-05 20:01 Sharing home and etc files with git iiijjjiii
@ 2008-06-05 20:50 ` Miklos Vajna
2008-06-05 22:48 ` Kelvie Wong
1 sibling, 0 replies; 3+ messages in thread
From: Miklos Vajna @ 2008-06-05 20:50 UTC (permalink / raw)
To: iiijjjiii; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 470 bytes --]
On Thu, Jun 05, 2008 at 04:01:11PM -0400, iiijjjiii <iiijjjiii@gmail.com> wrote:
> I would like to use git to keep revision histories of my home and etc
> directories.
First, git is to track content, not permissions. So it is not the right
tool.
Second, you can try etckeeper which does this on top of git.
But still please keep in mind that you may have serious problems, like:
if you get a conflict in /etc/passwd, you may not be able to login,
etc...
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Sharing home and etc files with git
2008-06-05 20:01 Sharing home and etc files with git iiijjjiii
2008-06-05 20:50 ` Miklos Vajna
@ 2008-06-05 22:48 ` Kelvie Wong
1 sibling, 0 replies; 3+ messages in thread
From: Kelvie Wong @ 2008-06-05 22:48 UTC (permalink / raw)
To: iiijjjiii; +Cc: git
On 6/5/08, iiijjjiii <iiijjjiii@gmail.com> wrote:
> I would like to use git to keep revision histories of my home and etc
> directories. I have several computers and I like to keep their environments
> similar. I could see git pulls updating .bash_aliases, .bashrc, and various
> bash and perl scripts I create in the home directory, and updating /etc
> config files. Git pushes would share any recent changes to other computers.
> This way no matter which computer I am working on, the environment will be
> similar and I can make changes and know they will be copied to the others.
>
Completely understandable; also remember that pushing, unlike pulling, does not
update the working tree (and you wouldn't want it to).
> I haven't figured out a good way to deal with the files that have local
> settings in them. Using .gitignore feels a little overkill. Only certain
> lines of the files need to be unique. Once they are set, I'd like subsequent
> changes to be updated. I could cherry-pick manually but I'd like a more
> automated method. I have read about etckeeper, git-home-history and gibak,
> but they seem to be designed for backing up and versioning files on one
> computer and not for sharing files.
>
> Has anyone done something similar using git or is another tool more
> suitable.
>
I'm fairly certain there are tools out there for this, but what I do is I have
all of the files that I want to add (such as ~/.${SHELL}rc, ~/.${SHELL}.d/*,
and .emacs) into ~/.git-home; then I symlink all of these files/directories
into my $HOME (with a short script that's also checked in).
I then throw this entire repo somewhere where all my other machines can
pull/push from, and I resolve merges as needed. It works fairly well.
--
Kelvie Wong
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-05 22:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-05 20:01 Sharing home and etc files with git iiijjjiii
2008-06-05 20:50 ` Miklos Vajna
2008-06-05 22:48 ` Kelvie Wong
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).