Actually there is a working directory with text .txt files and subdirectories that contain the same text files. And there is a glob-template: ** / *. Txt, which in the .gitignore file works on absolutely all text files of the project, including the files of the root directory.

Now remove all exceptions in .gitignore and try to use the same template in the console: git rm --cached \*\*/\* . The template works on all attached files, but not on the root directory files.

If you use a slash (/) in the console in the glob-template to specify the root directory, you receive a general error with a completely different address C: / Program Files / Git / program root.

I want to know the errors that I admit and why it happens at all (the difference between the work in the exception file and the console). I already understood how to get around this, but I want to understand the logic of how templates work. It is desirable in simple terms, because I started learning Git not long ago, and I don’t know Bash at all.

    0