How can I view the current .ignore list in TortoiseGit?
Asked Answered
K

1

5

I'm trying to add a folder to Git version control (its sibling is already in Git). But Git tells me that this folder is already in version control or is on the Ignore list. (It's not in version control - no icon for "vc" and no version history).

But I can't find where to see the list of .ignored files. (I looked in the .git folder and in TortoiseGit settings. No luck.)

Kukri answered 16/1, 2017 at 21:3 Comment(2)
I don't think TortoiseGit allows empty folders to be added to a repository. Assuming the folder isn't empty have you checked the .gitignore file in the repository root folder?Breakable
Git does not allow empty folders to be tracked.Thirtytwomo
T
8

Viewing a current Git ignore list is not that easy as there are several places where Git checks for .gitignore files.

Generally, within the working tree these are named .gitignore and can be located in every directory (in the repository root and every subdirectory). The defined ignore rules work (recursively) from the directory where the .gitignore is placed in.

Additionally, there is the .git/info/exclude file which is a local extension for the whole working tree.

Nonetheless, it is possible to define another file in git-config using the key core.excludesfile which defaults to %HOME%\.config\git\ignore.

See gitignore for more information.

Thirtytwomo answered 20/1, 2017 at 20:32 Comment(1)
This excellent answer had aroused my curiosity and I'm trying to build a list for this. So thanks a lot for the present answer, and, just in case, I welcome your insights on my question since you seem knowledgeable on the subject.Leaper

© 2022 - 2024 — McMap. All rights reserved.