4

I have several files shown as changed. If i revert changes nothing happens. If I remove them from disk and then run git checkout -- . from console they shown as changed again.

How to tell Idea to forget about them?

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

OS: Windows 7.

$ git config core.fileMode
false

$ git status
# On branch bugfix/XXXXX
nothing to commit (working directory clean)
talex
  • 17,973
  • 3
  • 29
  • 66

5 Answers5

8

I guess the problem is with file modes! I faced the same thing some time back when I moved my development to Windows.

Try running git config core.fileMode false and then check!

Hope it help!

Mudassir Razvi
  • 1,783
  • 12
  • 33
3
  • By using git status we can find out each file status (modified, not modified).

  • In our project, temporary files frequently change. In this case, git repository says our files are untracked or modified. For this we have to add these files to .gitignore to ignore them.

    We have to execute some commands. Please refer to 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 the relevant technology's .gitignore files in this GitHub repository.

  • To ignore the files which we mentioned in the .gitignore file, we have to execute the following commands.

    git rm -r --cached .
    git add .
    git commit -m ".gitignore is now working"
    
Community
  • 1
  • 1
Anjaneyulu Battula
  • 1,910
  • 16
  • 33
1

Have you tried to switch off Editor/Auto-import/Optimize import?

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

I would tend to think about the second possibility.

Good luck!

Community
  • 1
  • 1
  • Idea doesn't show aby changes on `Ctrl + D`, `git status` too. So it's not line ending problem – talex Sep 24 '14 at 15:25
1

There is a "Refresh File Status" under the VCS menu. Can't hurt to give it a shot.

Antoine Snyers
  • 682
  • 3
  • 7
1

It is not complete solution. But as long my problem some kind of Idea magic solution magical too.

When I checked out another branch changes disappear. If I checked out initial branch it occur again.

Magic to all :)

talex
  • 17,973
  • 3
  • 29
  • 66