+4

Allow choosing the default destination for new ignore rules

Patrick Lehmann 4 years ago updated by Thomas Singer 3 years ago 5

This is a followup / extension to:

    Currently, adding new ignored files will be stored in a local .gitignore file (local to the ignored file / same directory). It would be nice if the default option for the destination dropdown box could be selected in settings.

    Currently, I need to change the dropdown on every ignored file or pattern to .gitignore in the repository root.

    Image 413

    +3

    I'm wondering whether ".gitignore in repository root directory" would be appropriate default anyway?

    I don't know if it's a Windows Linux thing or if it depends on the client ontop of Git, but some "tools" don't support *.gitignore files in child directories.

    That's one reason why we have the style rule to store all ignores in the repository root's file. Another is to collect it at a prominent location, so you don't have "side effects".

    +1

    We exclusively use ".gitignore in repository root directory" and would love to be able to choose this as the default option. I would be fine if this is a low-level option that I can tell users in our company to use.

    Regarding why we use it: having .gitignore files littered throughout a repo makes it very difficult to find where/why a particular file is ignored/missing etc. Having a single file also makes managing .gitignores in our >100 repositories much easier for scripts, etc.

    I was just about to create this exact same feature..
    I don't think it even has to be "make a setting" .. just remembering the last used would be useful.

    I had to just make 2 folders ignored and even then, it was annoying doing it for the 2nd time.. Having to do it over and over for a lot would just be ARRGH!

    +2

    SmartGit 21.1 #17063 will remember the last selection.