Search code examples
javagitintellij-idea

IntelliJ/GIT: How do I clear/remove files from the commit window?


I have just started a new project in IntelliJ and created a new repository on github where I can get commit and push to.

I can see that every time I want to do some implementation I can also see these files under Changes. How can I remove these from the commit window? I just want to see the changes/implementation I make, not the other file what I will never upload anyway.

How can I remove/clean these?

Here is the files I do not want to see in the commit window

update: I removed the whole project and tried to add these files to the gitignore file from start and it worked, seemed like a bug or something with my IDE


Solution

  • It seems that you have added these files to Git. You need to add git rm --cached <filename> first in order to remove these files from git.

    Then you need to right-click on these files in Project view -> Git | Add to .gitignore