Re: User-wide ignore list
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 15, 2007, 11:37 UTC
- Message-ID
- <Pine.LNX.4.63.0702151225130.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <vpqabzfsn1b.fsf@olympe.imag.fr>
Hi,
[Cc'ed Duy, as he raised the same concerns.]
On Thu, 15 Feb 2007, Matthieu Moy wrote:
Show 11 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > On Thu, 15 Feb 2007, Matthieu Moy wrote: > > > >> Is there a way to have a per-user ignore list in git? > > > > It's not really per user, but how about doing it with templates? > > Correct me if I'm wrong (I didn't really find a documentation for > templates), but I believe this would only apply to newly created > project.
Yes. However, you can safely call "git init" in an _existing_ repo. It does not overwrite existing files.
> Then, it doesn't apply if I clone the project of someone using another > editor for example, nor to my old projects if I add something to the > list of things I want to ignore.
"git clone" implicitly calls "git init"; Therefore you get the templates, too. But you're right, if you already edited .git/info/exclude, this will not overwrite it.
Of course, you could fiddle with ~/.gitconfig, or even ~/.gitignore, but I suggest that you first think about a sane syntax.
Also note that this opens the door for shooting-in-the-foot; files you are certain you want ignored can show up in a cloned repo all to easy.
Ciao, Dscho