git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Matthieu MoyNext: Nguyen Thai Ngoc Duy
Message 5 of 11 in “User-wide ignore list”
  1. Matthieu MoyFeb 15, 2007
  2. Johannes SchindelinFeb 15, 2007
  3. Nguyen Thai Ngoc DuyFeb 15, 2007
  4. Matthieu MoyFeb 15, 2007
  5. Johannes SchindelinFeb 15, 2007
  6. Nguyen Thai Ngoc DuyFeb 15, 2007
  7. Junio C HamanoFeb 15, 2007
  8. Andy ParkinsFeb 15, 2007
  9. Johannes SchindelinFeb 15, 2007
  10. Andy ParkinsFeb 15, 2007
  11. Johannes SchindelinFeb 15, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.