Publii icon indicating copy to clipboard operation
Publii copied to clipboard

"Version Control With Git" Bug

Open iedmrc opened this issue 5 years ago • 4 comments

Hi, I "git initialize" and "git push" the Publii/sites folder in order to control version history and share between authors instead of dropbox. When other author pull the repository, Publii causes an error.

Here is what happens:

./input/languages
./input/root-files
./input/media/temp
./input/media/posts
./input/media/website/responsive
./input/media/files

directories are empty and because of git doesn't include empty directories to version control, Publii can't find them and can't start. I think Publii should create if the directory It needs doesn't exist. This doesn't have to be a big problem that blocks Publii to start . Also this is just one site. Remember we can have more than one site and this disallows us to use other sites.

Thank you for your effort!

iedmrc avatar Dec 18 '18 12:12 iedmrc

I think that we should add empty .gitkeep files to these folders. I only need to check if this change won't affect app behaviour. Also .gitkeep files should be skipped during sync.

dziudek avatar Dec 25 '18 22:12 dziudek

That is exactly what I've done. But I thought this is just a workaround. If you think this is the best solution, then it is okey and I'm happy to have done it this way. Thanks!

iedmrc avatar Dec 25 '18 22:12 iedmrc

That is exactly what I've done. But I thought this is just a workaround. If you think this is the best solution, then it is okey and I'm happy to have done it this way. Thanks!

that's the very pourpose of .gitkeep files, to keep empty dir versioned

netalex avatar Apr 23 '19 21:04 netalex

This no longer appears to be a problem - I have just tested with my own site and Publii creates the empty folders without any complaining when they don't exist.

lxop avatar May 10 '21 10:05 lxop