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

Re: Fwd: Add git ignore as builtin

From
Javier Domingo Cansino <javierdo1@gmail.com>
Date
Nov 23, 2014, 19:25 UTC
Message-ID
<CALZVapm0VJ9JsT3Ur86F-vYFMoRtKgDiJ3PO_aYPRyNFgz6iEw@mail.gmail.com>
In-Reply-To
<xmqq8uj9y0ck.fsf@gitster.dls.corp.google.com>

I would love to have such tool included in the toolchain, but being able to use it to edit all the ignore chain, defaulting to .gitignore. Explain the reason in my case.

Usually, when ignoring stuff, you will probable ignore already your IDE/Editor files using a global gitignore. And most of the times in a per-project basis, you will be ignoring their output files. I only use .git/info/exclude when I have something really special that I don't want to share publicly, such as a data/ folder to run the project or so.

That way, most of the times I will be modifying .gitignore, sometimes my global gitignore and very occasionally, .git/info/exclude.

That's my case, and that I know of, people have that usage order, .gitignore > global gitignore > local gitignore.

For sake of uniformity, I would use the same context specifiers as in git-config. Defaulting to --repo for .gitignore, using --local for the .git/info/exclue, using --global for the global gitignore, and --system for the system one.

Also, about adding and excluding, I would recommend using verbs instead of arguments, which would be in consonance with git remote.

git ignore exclude .... git ignore include ....

You could also make it "smart" by allowing to use it as the Cisco managing commands, or the ip tool (ip a == ip address, ip a a == ip addr add, etc.), resulting in the following: git ignore e .... git ignore i ....

-- 
Javier Domingo Cansino
Previous: Junio C Hamano
Message 5 of 5 in “Fwd: Add git ignore as builtin”
  1. Alberto Fanjul AlonsoNov 15, 2014
  2. Ryan JacobsNov 17, 2014
  3. Jeff KingNov 17, 2014
  4. Junio C HamanoNov 17, 2014
  5. Javier Domingo CansinoNov 23, 2014

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.