I have folder
and src/folder
. I want to ignore the former but not the latter, except folder
in .gitignore
ignores both.
folder
matches any file and directory named "folder" in any directory. Put a slash in front:
/folder
This only matches the directory in the root of your repository.