Hello I have an git repository with an existing .gitignore file.
Something seems off since some of the paths and/or files in the .gitignore file are under source control.

To clean that up I was looking for a way to list all files that are under source control that should be ignored because they are included in the .gitignore file.

There is no general way in saying if the files needs to be ignored or included so I need this list to review every file manually.

Does anyone know a way how to do that?

Example: This is very simplified, we are talking about 1000 of files here.
A folder under source control have 4 files in it

1. .gitignore
2. test.cpp
3. test.log
4. test.result

Contents of .gitignore

```
.gitignore
test.*

```

test.cpp is already under source control so changes are tracked. This is how it should be. However test.cpp is clearly included in the .gitignore file. Therefore I like to modify the gitignore file so that it contains

```
.gitignore
test.*
!test.cpp

```

so what I want is a list that shows me that test.cpp is under source control while gitignore is exluding it so that I can modify the gitignore file to exactly reflect the current state.

The result of the list in this example should be.

1. .gitignore
2. test.cpp

In my more complex scenario this should also work with files in subfolders.