### Discussed in https://github.com/quarto-dev/quarto-cli/discussions/6005

<div type='discussions-op-text'>

<sup>Originally posted by **jakobarendt** June 22, 2023</sup>
### Description

Thank you so much to all for developing the incredibly powerful Quarto! I am currently writing my master's thesis with your software, and I am only starting to grasp what it can do.

One thing I have noticed, is that it makes some changes to my `.gitignore` file, when I run `quarto render` for my quarto book project. You have already explained this further in [this answer](https://github.com/quarto-dev/quarto-cli/discussions/575#discussioncomment-2524433).

In my case, however, it adds `/.quarto/` as an item to the `.gitignore` file, even though I already have `.quarto` in it. To my understanding of the syntax, the latter is even more "restrictive" than the former in the sense that it always excludes `.quarto` directories/files independently of where are they are stored relative to the `.gitignore` file.

I imagine that you still had you reasons for implementing it the way it is now. Why does `quarto render` not acknowledge `.quarto` as a `.gitignore` parameter?

Another aspect that I want to mention here is that having `quarto render` acknowledge the more restrictive `.quarto` exclusion would make it more consistent with the R command `usethis::git_vaccinate()`, since there the ignore parameter is also `.quarto`.

Quarto version: 1.3.361
Machine: macOS Ventura 13.4</div>

2023-06-23T08:29:30Z
mcanouil
enhancement
open
Improve how Quarto handles `.gitignore` to keep it clean
https://github.com/quarto-dev/quarto-cli/issues/6011