chombee chombee at
Mon Dec 3 14:04:11 CET 2007

On Sun, Nov 25, 2007 at 09:45:02PM -0500, Joey Hess wrote:
> > * Don't make the git repository directly in your homedir. You don't
> > want git operating on 'live' config files, as this isn't what git was
> > designed for, and who knows what might happen. If git dumps some merge
> > conflicts into a config file while the file is in use, you could break
> > your system.
> This could happen with svn too. The worst case I can think of would be
> if .profile has merge markers that the shell thought looked kinda like
> redirection. I've never seen the merge markers truely break something
> like that in several years of using svn for my home. The worse I see is
> a web browser or music player failing to start because it can't parse
> its config.
> Anyway, there are plenty of places that merge markers could be inserted
> into files in a linux kernel tree, or other thing that git is
> semi-intended to be used for, with similar potential for bad results if
> you type 'make' at the wrong point.
> I'd draw the line at (non-fast-forward?) merging into /etc. I like my
> passwd file. Anything else, I can recover from..
> Of course if you feel safer copying stuff around, that's fine too, I
> think it would be too annoying for me though.

Is there some way to get git-pull to abort if it's not going to do a
fast-forward? I think it just does a merge automatically. That's the
problem, cause you might not be expecting it. It'd be good if it could
warn you if a non-fast-forward merge was gonna happen.

I originally had a .git right in ~/, but I was scared away from doing 
it by people on the git irc channel. I have to admit, I couldn't really 
think of anything terrible that could really happen. Especially in my 
case, when I only check in a few config files and ignore almost 
everything. The worst example was if your .bashrc got merge markers in 
it, then you would not be able to launch a terminal. But to be honest, 
I think the terminal would launch anyway, and just complain. Then you 
just fix it. I managed to break a .muttrc on one host too, which was 
annoying, but not hard to fix.

It turns out it's really inconvenient to _not_ have .git directly in 
your homedir for config files. git status can't tell you what you have 
modified. And you have to remember when to copy files into the repo, 
and when to copy them out of the repo, for each machine. A large reason 
for versioning everything with git is to reduce the amount of stuff you 
have to keep track of mentally. Just commit your work and push it, let 
the repo remember for you. You don't even have to remember what files
you've modified as git can tell you. But this doesn't work if you have
to do all the copying manually. You'd have to seriously script around 
this inconvenience, so I guess it's not worth it.

I'm going to go back to a repo in my homedir, but only for config 
files. I'll just tell .gitignore to ignore everything for that repo, 
and then checkin those few config files I want tracked.

More information about the vcs-home mailing list