I need a gitignore that ignores basically all folders with a few exceptions. I have 4 folders that needs to be sync with git 3 of them start like this :
RCU*/
And another folder named Tools.
For example :
I need to ignore all folders except :
Every other folders than these needs to be ignored (and other folders will be added), is there a way to achieve this ?
Thanks
# Ignore all directories except specific ones
/*
!/RCUFromUR/
!/RCUToB360/
!/RCUToUR/
!/Tools/
# If you want to exclude subdirectories from being tracked under the above folders, you can add these
!/RCUFromUR/*/
!/RCUToB360/*/
!/RCUToUR/*/
!/Tools/*/