gitignore - Git directories - how to track directories but not content -


i have .gitignore file so

.gitignore  /data* /node_modules/* /bower_components/* 

i want have directories pushed , pulled not contents of directory. above, directories ignored entirely. possible?

you can put .gitignore file in each directory want track without contents, , have contents (the .gitignore's file, is) *, ignore files in directory. git add .gitignore files , commit them. result should directories tracked (because of tracked .gitignore files in them), files in directories ignored.


Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -