Skip to content
New issue

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

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

Already on GitHub? # to your account

Git phantom changes cause error on update #1028

Open
hohwille opened this issue Feb 9, 2025 · 0 comments
Open

Git phantom changes cause error on update #1028

hohwille opened this issue Feb 9, 2025 · 0 comments
Labels
bug Something isn't working git update related to updating software or the entire ide windows specific for Microsoft Windows OS

Comments

@hohwille
Copy link
Member

hohwille commented Feb 9, 2025

Expected behavior

As a IDEasy user, I want to run ide update so that I am up-to-date.

Actual behavior

$ ide update
Updates are available for the settings repository. If you want to apply the latest changes, call "ide update"
Start: Pull settings repository
error: Your local changes to the following files would be overwritten by merge:
        intellij/workspace/update/.idea/workspace.xml
Please commit your changes or stash them before you merge.
Aborting
Running command 'C:\Program Files\Git\clangarm64\bin\git.exe' with arguments '--no-pager' 'pull' '--quiet'
failed with exit code 1!
Git pull on branch main failed for repository C:\Users\joerg\projects\IDEasy\settings.
Failed to update git repository at C:\Users\joerg\projects\IDEasy\settings
See above error for details. If you have local changes, please stash or revert and retry.
Typically you should abort and fix the problem. Do you want to continue anyways?
Option 1: yes
Option 2: no

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. the problem is that I have this phantom changes problem with git (due to EOL mismatch or something). I can try to revert my changes with git but my local repository always stays changed and git status reports the file to be modified no matter what I do. IMHO this is actually a bug in git itself that git seems to consider as a feature.
  2. ide update

Related/Dependent Issues

Comments/Hints:

We already had this effect earlier globally blocking our entire team for IDEasy repository.
IMHO we somehow resolved this with a .gitattributes file but all devs needed to rebuild their git index to make the error go away.
It is absolutely annoying that git behave like this and insists on a file being modified even though this is a lie preventing regular git operations like git pull to fail with pointelss merge conflicts.

For the record:
I can even delete the conflicting file with rm and then run git pull on the repo and get the error reproduced.
So in the end this is a pure bug of git and has nothing to do with IDEasy itself.
However, we need to find at least a workaround to prevent git from blocking us.

Affected version:

  • OS: Windows
@hohwille hohwille added bug Something isn't working git update related to updating software or the entire ide windows specific for Microsoft Windows OS labels Feb 9, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Feb 9, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working git update related to updating software or the entire ide windows specific for Microsoft Windows OS
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant