I usually use a mix of command line and IDE GUI to run git commands. And today while trying to click Git Commit I accidentally clicked Git Add for the whole folder including my IDE .idea sub-folder which I don’t need in my repository.
So I had to ‘unstage’ the content of the .idea sub-folder.
The operation is opposite to git add and is called git reset. The parameter is the file (or directory) which has to be ‘unstaged’.
git reset <file>
In my case it was:
git reset .idea