I have the following .gitignore file:
# Ignore everything
*
# But not these
!.gitignore
!Code
!Materials
The intention is to ignore everything except the .gitignore file itself, and everything under the Code and Materials directories. Somehow when I open SourceTree, the .gitignore file is properly excluded, but the Code and Materials directories are ignored. What did I do wrong?