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)
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!
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With