get reset (un-add) a single file?
I accidentally did a git add on a whole directory before I realized I don't need to add the vendor tree or composer.lock file to the repository. It is possible to do a 'git reset [filename]' to essentially 'un-add' a file you added accidentally, but I did not immediately see any options in the VCS/Git options that would do this. Is there support for this function?
SW
Please sign in to leave a comment.
Hello,
Unfortunately it is not possible - please check the thread at https://youtrack.jetbrains.com/issue/IDEA-107359.
You can leave a comment there to clarify if the team changed their mind or not.
this is possible (at least now), use "Git -> Rollback" and make sure "delete the local files" is not checked. this will unstage those files.
it is a shame that the person who replied in the issue linked above did not consider that the request was to unstage changes rather than actually remove files that have been committed.
I can second Tom Carchrae, his method worked for un-staging file(s).