git didn't push empty folders -


i init folder. added files commit them , push them. looking fine...but missing files , folder.

to example .gitignore file

web/images/uploaded_profile_pictures/* 

but there should uploaded_profile_pictures folder... how write in .gitignore ignore content of folder.. , keep folder?

and second problem... why there missing content???

after push

enter image description here

there can't folders without files in git repositories, git ignore empty folders (or folders contain ignored files). common workaround create placeholder files in empty directories want include in git repository.

touch web/images/uploaded_profile_pictures/.empty git add web/images/uploaded_profile_pictures/.empty 

now .gitignore:

web/images/uploaded_profile_pictures/* !web/images/uploaded_profile_pictures/.empty # or !.empty 

this make git ignore files in folder except of .empty, allowing add folder repo.

for second question: kind of files missing? random ones?


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -