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)
source to share
-
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"
source to share
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!
source to share