# Yo, is this my project or aiexclusion is conflicting with whatever in .gitignore file?

**URL:** <https://community.firebasestudio.dev/t/yo-is-this-my-project-or-aiexclusion-is-conflicting-with-whatever-in-gitignore-file/19936>\
**Category:** AI\
**Tags:** troubleshooting\
**Created:** [December 9, 2025, 7:41pm UTC](https://community.firebasestudio.dev/t/yo-is-this-my-project-or-aiexclusion-is-conflicting-with-whatever-in-gitignore-file/19936 "2025-12-09T19:41:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saw](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/saw/32/11846_2.png) [@Saw](https://community.firebasestudio.dev/u/Saw)\
**Post date:** [December 9, 2025, 7:41pm UTC](https://community.firebasestudio.dev/t/yo-is-this-my-project-or-aiexclusion-is-conflicting-with-whatever-in-gitignore-file/19936/1 "2025-12-09T19:41:53Z")

</div>

I’m developing the GO app using a **Gemini-integrated development environment**. I’ve observed a consistent behavior following a code push to GitHub:

- Files excluded via **`.gitignore`** are automatically being treated as excluded for the AI chat feature.

- The AI context menu says the message: **“The current file is hidden from chat using .aiexclude”**.

- Crucially, trying to explicitly _include_ a file (e.g., `chats.txt`) by using the un-exclusion pattern **`!chats.txt`** within the **`.aiexclude`** file is unsuccessful.

This seems to stem from a policy that links the contents of **`.gitignore`** to AI exclusion, likely for security purposes (e.g, protecting configuration files like `.env`). My requirement is to provide the AI with context from local, ignored files (like specific documentation or context notes) **without pushing them to the repository**. I need a reliable method to make these specific files available to the AI.

_ **The current workaround is to disable the `.gitignore` file temporarily by deleting or renaming it while we are working.** _  
I believe this is tedious and dangerous in case we forgot to add back before we push, and we should be able to control things with just `.aiexclude` file.

---

<div class="post-metadata">

**Author:** ![tianzi](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/tianzi/32/3430_2.png) [@tianzi](https://community.firebasestudio.dev/u/tianzi)\
**Post date:** [December 10, 2025, 7:46pm UTC](https://community.firebasestudio.dev/t/yo-is-this-my-project-or-aiexclusion-is-conflicting-with-whatever-in-gitignore-file/19936/2 "2025-12-10T19:46:15Z")

</div>

> [@Saw](#):
>
> This seems to stem from a policy that links the contents of **`.gitignore`** to AI exclusion, likely for security purposes (e.g, protecting configuration files like `.env`). My requirement is to provide the AI with context from local, ignored files (like specific documentation or context notes) **without pushing them to the repository**. I need a reliable method to make these specific files available to the AI.
> 
> _ **The current workaround is to disable the `.gitignore` file temporarily by deleting or renaming it while we are working.** _  
> I believe this is tedious and dangerous in case we forgot to add back before we push, and we should be able to control things with just `.aiexclude` file.

Note that `.aiexclue` is primarily used by Gemini Code Assist (the IDE plugin) while Gemini CLI uses `.geminiignore`.

1. Try creating a local settings file at `.gemini/settings.json` and add the following configuration to disable the Git ignore check:  
`{ "context": { "fileFiltering": { "respectGitIgnore": false } } }`  
create a `.geminiignore` file in your project root, and curate its content accordingly. make sure to add `.gemini` to your `.gitignore`
2. if you only need to read an ignored file once, you can use the shell command feature (!) or piping to pass the file content directly.

> Here is some context:  
> ! cat path/to/ignored\_notes.md  
> ..  
> `cat ignored_notes.md | gemini -p "Use this context to..."`

---

<div class="post-metadata">

**Author:** ![Saw](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/saw/32/11846_2.png) [@Saw](https://community.firebasestudio.dev/u/Saw)\
**Post date:** [December 11, 2025, 4:26pm UTC](https://community.firebasestudio.dev/t/yo-is-this-my-project-or-aiexclusion-is-conflicting-with-whatever-in-gitignore-file/19936/4 "2025-12-11T16:26:38Z")

</div>

Since I’m just using the **Firebase Studio built-in Gemini IDE extension** , the initial suggested step **didn’t work**. I mean, I can successfully exclude files not listed in `.gitignore` by adding them to `.aiexclude`. However, all files listed in `.gitignore` are **automatically ignored** by the extension, and the only way to un-ignore them is by removing them from the `.gitignore` file itself. And of course, also trying to exclude the files from `.geminiignore` didn’t work too.

And also, it’s ignoring ‘.gemini/settings.json’ path too since I added the path in `.gitignore` file.
