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

fix(ignore): removes cached data/configuration.yaml #19232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mateja176
Copy link

@mateja176 mateja176 commented Oct 9, 2023

Firest reference .gitignore:

# Ignore config
data/*.yaml
!data/configuration.example.yaml

Second reference Linux configuration docs.

@Koenkk
Copy link
Owner

Koenkk commented Oct 9, 2023

I really would like to get rid of this file but it will break existing setups (for those having checkout before 70a72dd)

@mateja176
Copy link
Author

I really would like to get rid of this file but it will break existing setups (for those having checkout before 70a72dd

Let’s imagine that John Doe cloned the repo before ‘70a72dd’. If John pulls the latest commit, following this PR, his local ‘configuration.yaml’ will be preserved. What’s the scenario you’re wary about?

@Koenkk
Copy link
Owner

Koenkk commented Oct 10, 2023

He will get a merge conflict I believe

@mateja176
Copy link
Author

He will get a merge conflict I believe

I've tested a couple of scenarios:

  • If data/configuration.yaml hasn't been updated, it will get deleted after pulling this commit. Though no data is lost, becuase it's straightforward to recreate it by running cp data/configuration.example.yaml data/configuration.yaml or copy-pasting its contents from the git history.
  • If data/configuration.yaml has been updated, it's a prerequisite to backup the changes and discard them from the working directory, in which case it's trivial to recreate the file from the backup. Alternatively, if the changes are stashed before pulling this commit, after poping the stash and choosing the option Keep their version, the file will be added to the working directory in conjunction to being ignored by git.

@Koenkk
Copy link
Owner

Koenkk commented Oct 11, 2023

can you integrate these changes in the update.sh script? I know not all users use this and I still expect a lot of issues to be reported due to this change but at least we tried 😀

@stefanrenne
Copy link

@Koenkk to get more awareness for the update.sh script, maybe its an idea to update this page ;) https://www.zigbee2mqtt.io/guide/installation/01_linux.html#for-later-update-zigbee2mqtt-to-the-latest-version

Koenkk added a commit that referenced this pull request Nov 14, 2023
@Koenkk
Copy link
Owner

Koenkk commented Nov 14, 2023

@stefanrenne done!

Koenkk added a commit to Koenkk/zigbee2mqtt.io that referenced this pull request Nov 14, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants