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

Re: Configurable .gitignore filename?

From
JPJari Pennanen <jari.pennanen@gmail.com>
Date
Mar 5, 2013, 10:28 UTC
Message-ID
<CACoicvK77mepwk-n9ZQ7TtCnMZfqDVycg_CgH5zHE3u6=KxHog@mail.gmail.com>
In-Reply-To
<CAJDDKr55ayTpzXPG3j5czY=-W08L8QjhMmjqWdRpoWO=MpHdyg@mail.gmail.com>
2013/3/5 David Aguilar <davvid@gmail.com>:
Show 8 quoted lines
> On Mon, Mar 4, 2013 at 7:47 AM, Jari Pennanen <jari.pennanen@gmail.com> wrote:
>> I'm actually aware of that. Problem is the normal .gitignore files
>> must *not* be used in the second GIT_DIR at all, in my case it's for
>> syncing so I need to sync almost all files (including stuff inside
>> .gitignore), though I'd still like to retain some ignore files for
>> second GIT_DIR, e.g. like in rsync the .rsync-filter file.
>
> How about .git/info/exclude in the 2nd GIT_DIR?  Would that help?

The second GIT_DIR must not use the .gitignore files of the first GIT_DIR, so it does not help.

Only way to skip the .gitignore files in git-add is to use "git add -f ." but that skips all excludes, including the .git/info/exclude. I need to skip .gitignore files used by the other GIT_DIR and still have some of ignore rules, IMO this is not possible at the moment.

Previous: David Aguilar
Message 5 of 5 in “Configurable .gitignore filename?”
  1. Jari PennanenMar 4, 2013
  2. Matthieu MoyMar 4, 2013
  3. Jari PennanenMar 4, 2013
  4. David AguilarMar 5, 2013
  5. Jari PennanenMar 5, 2013

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.