Can't revert changes to Idea IDE

I have several files shown as modified. If I go back to change, nothing happens. If I remove them from disk and then run git checkout -- .

from the console, they show up as changed again.

How to tell Ideas to forget about them?

Other actions (like pull, commit and push) work fine.

OS: Windows 7.

$ git config core.fileMode
false

$ git status
# On branch bugfix/XXXXX
nothing to commit (working directory clean)

      

+3


source to share


5 answers


This is not a complete solution. But as long as my problem is, some kind of magic solution to the idea is magic too.

When I checked out the changes of the other branch disappear. If I check out the initial branch it happens again.



Magic for everyone :)

+1


source


I think the problem is with file modes! I ran into the same thing some time ago when I transferred my development to Windows.

Try to run git config core.fileMode false

and then check!



Hope it helps!

+5


source


  • Using git status

    , we can find out each status of the file (changed, not changed).

  • In our project, temporary files change frequently. In this case, the git repository says our files are not being tracked or changed. To do this, we must add these files to in .gitignore

    order to ignore them.

    We have to execute some commands. See this question and check the following commands.

    git reset HEAD filenamewithpath -> unstaging a staged file
    git checkout -- filenamewithpath -> unmodifying a modified file
    
          

  • You can find related .gitignore

    file technologies in this GitHub repository .

  • To ignore the files mentioned in the file .gitignore

    , we must execute the following commands.

    git rm -r --cached .
    git add .
    git commit -m ".gitignore is now working"
    
          

+3


source


Have you tried to disable editor / auto-import / optimize imports?

Second idea: now known LF / CRLF issue http://www.jetbrains.com/phpstorm/webhelp/handling-lf-and-crlf-line-endings.html git status shows modifications even with autocrlf = false

I would think about the second possibility.

Good luck!

+1


source


The VCS menu has "Update File Status". Doesn't prevent him from taking a picture.

+1


source







All Articles