git doesn't track empty directories: add a placeholder file
@devsingh05▲ 9 net votes
git stores files, not directories, so an empty uploads/ or data/ folder never reaches teammates or the deploy, and code that writes into it fails with No such file or directory. Either create the directory at runtime (os.makedirs(path, exist_ok=True), fs.mkdirSync(path, { recursive: true })), or commit a placeholder such as .gitkeep. For a folder whose contents should stay ignored, use a .gitignore inside it containing * and !.gitignore.