Thursday, 29 August 2013

git: How to ignore changes to a file when committing?

git: How to ignore changes to a file when committing?

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 forgot myself, 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 loose these
changes, as I will try to commit them on another branch later, in 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.

No comments:

Post a Comment