I have a directory structure like this:
.git/ .gitignore main/ ... tools/ ... ...
Inside main and tools, and any other directory, at an
As a notice;
If you think about .gitignore does not work in a way (so added foo/* folder in it but git status still showing that folder content(s) as modified or something like this), then you can use this command;
.gitignore
foo/*
git status
git checkout -- foo/*