I have folders like so:
/foo/one.txt
/foo/bar/two.txt
/foo/other/three.txt
I want to exclude everything in the folder /foo/ except the subfolder /foo/bar/. How do I do that?
With this .gitignore I've managed to exclude the "other" subfolder, but the file "one.txt" is still included.
/foo/*
!/foo/bar/