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

Extending .gitignore

From
DKDmitry Kakurin <dmitry.kakurin@gmail.com>
Date
Aug 18, 2007, 09:43 UTC
Message-ID
<C0E9F681E68D48EB8989022D11FEE3D1@ntdev.corp.microsoft.com>
Currently .gitignore serves (at least) 2 purposes:
1. Specifies which files to ignore during git add
2. Specifies which files to ignore during git cleanup, but still deletes them with git cleanup -x
So it effectively splits files in 2 categories.
I always find myself with 3 categories of files:
1. Important files that I want tracked by SCM (normal files like *.c)
2. Unimportant files that I want ignored by SCM and cleaned (usually build files like *.obj, *.exe)
3. Important files that I don't want to be tracked by SCM but also I don't want them to be cleaned either (these are usually 
machine-specific config files)

So I want to be able to say to git: don't track this file, but don't delete it either (even with clean -x). What do you think? Does it make sense? Can it be done right now?

- Dmitry 
Next: Junio C Hamano
Message 1 of 2 in “Extending .gitignore”
  1. Dmitry KakurinAug 18, 2007
  2. Junio C HamanoAug 18, 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.