Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sparse checkout removes local files that are on repo but not in sparse checkout #228

Open
hdwebpros opened this issue Jun 28, 2023 · 0 comments

Comments

@hdwebpros
Copy link

First and foremost, thank you for your contributions to this awesome tool. When working properly, it's invaluable. In the course of using your plugin, we've encountered many challenges associated with the Git sparse-checkout feature. While we understand that the sparse-checkout can optimize performance for much larger repositories, our experience shows that many Grav sites/repositories are rather small and would function more seamlessly without the Git sparse-checkout feature.

In fact, a peculiar behavior we've noticed is that certain files (present in the remote repository, present local but not included in the sparse-checkout) are being deleted from the local workspace, most likely during a pull operation, which is an unwelcome side effect. This has been reported by multiple other users too, and seems to be a point of confusion and potential data loss. 4 people on this issue: #213 have reported it, I've had it happen on 10-12 sites, and I think it's an issue that people just deal with (we would just upload/restore the wiped files for years). It seems to just be the nature of sparse checkout.

Given this, we propose reconsidering the use of sparse-checkout as the default setting. Instead, it might be more user-friendly and safer to have standard Git operations as the default, while providing the option to enable sparse-checkout for users dealing with larger repositories. We believe this approach could make the plugin safer and more intuitive for a wider range of users.

If that's a route we should take, please let me know. I'm willing to work in conjunction with whomever to fix this issue, but we should address it sooner than later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant