Git use the .gitignore
to ignore or to track files in ignored paths.
In your case you need to do add this to your .gitignore
file in your project root directory. Create the file is it does not exist
#List of files to ignore
Debug/*
#List of files to exclude from the ignored pattern above
!Debug/Pic
!Debug/Pic/*
What is in content of this sample .gitignore
Debug/*
- This will ignore all the files under the Debug folder
!Debug/Pic/*
- The !
is a special character in this case telling git to exclude the given pattern from the ignored paths.
In other words:
We "told" git to ignore all the files under the Debug
folder but to include all the files under the Debug/Pic/
folder.