I did search for the solution, yet I believe my situation is a bit different than those I read about.
I am working on a particular branch and made a mistake, having edited a file in a way that is unrelated to the theme of the branch, and now want these changes to not make it into the commit. I do not want to lose these changes, as I will try to commit them on another branch later, one way or another.
I tried git rm --cached
but then I see status deleted
in my git status
- will the file be removed from the repository? I don't want that - I want it to stay unchanged from whatever it is in previous commit on my working branch.