Homedir .gitignore when using vcsh

Olaf TNSB still.another.person at gmail.com
Mon Feb 25 04:33:43 CET 2013


Hello All,

I've finally moved to using the vcsh approach to manage my homedir - only 5
years behind the curve.. :-)

One of the things that was causing me to hold off was the inability to see
what was _not_ being tracked, for example the discussion here [1] and
Penny's comments [2].

So I've come up with what I think is a solution. Please feel free to point
out the limitations, better ways to do things, or that it's been fixed in a
different way...

I have a simple repo that I include in my homedir which I call
gitignore-global : https://github.com/resuscv/gitignore-global
This repo is simply a way to
(1) Capture any files or directories that I know that I would want in my
homedir .gitignore in an ideal world.
These are listed in .gitignore.d/gitignore-global.base (Note this is
different to the standard naming for vcsh .gitignore.d content)
(2) Capture any directories that I would like to keep an eye on for
untracked content (like ~/bin)
I've put an empty dot-file in the directory. Standard git trick for
tracking an empty folder.

The trick is in the mr rule/config :
https://github.com/resuscv/vcsh-mr-setup/blob/master/.config/mr/available.d/gitignore-global.vcsh

Here I use the fixup option to cat the contents of the ignore files in
.gitignore.d/ and gitignore-global.base into gitignore-global. I remove any
lines that are ignore-all (*) and strip leading bangs to make
gitignore-global actually ignore the known files in the other repos.

With this setup I *think* I'm able to keep an eye on what is not being
tracked in my home directory and the other directories that I have an
interest in watching.

Hope this helps someone else out.

Olaf

[1] http://www.mail-archive.com/vcs-home@lists.madduck.net/msg00078.html
[2]
http://mjollnir.org/blog/migrating-my-homedirectory-from-one-repo-to-many/


More information about the vcs-home mailing list