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

sr3_pull overwrites any local changes on the nodes #10

Open
reidsunderland opened this issue Dec 1, 2023 · 1 comment
Open

sr3_pull overwrites any local changes on the nodes #10

reidsunderland opened this issue Dec 1, 2023 · 1 comment

Comments

@reidsunderland
Copy link
Member

reidsunderland commented Dec 1, 2023

sr3_pull currently does a git reset --hard HEAD before pulling the config and plugins repos. This was intentional, I wanted to overwrite local changes that had been made and forgotten about, and I wanted to ensure the configs were identical across all cluster nodes and reflected the remote repo.

But when multiple people are working on stuff, sometimes the local changes need to stay around for a while.

Options:

  • do a git stash --include-untracked before pulling. This would let someone come back and recover their changes. Problem: need a way to get rid of old stashes that aren't needed.
  • warn the user that the local repos are not clean and abort. Provide a --force or similar option to force overwrite local changes.
  • other options?
@reidsunderland
Copy link
Member Author

sr3_pull doesn't delete untracked files, it just resets any modified files. Apparently git clean --force -d (-d for directories) is needed to delete untracked.

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