put everything in gitignore of folder except folder itself code example Example: git ignore all files and folders in folder * */ !.gitignore