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
Post a Comment