I have the following directory structure:
test/a test/b/c test/a/b/Ouput test/c/d/e/Output test/f/Output I want to ignore all the "Output" directories under "test". I tried test/**/Output, but it didn't work. What am I doing wrong?
gitignore is a plain text file in which each line contains a pattern for files or directories to ignore. It uses globbing patterns to match filenames with wildcard characters. If you have files or directories containing a wildcard pattern, you can use a single backslash ( \ ) to escape the character.
You can nest gitignores in a project to have per directory ignore files. e.g. Now a/b/. gitignore can handle any ignoring in subdirectory b .
You said you want the Output/ pattern to match only under the test/ directory, so in the test/ directory, create a .gitignore file with the contents:
Output/ If you put this pattern in your top-level .gitignore file, then it will match in all directories under the top directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With