I do not want to undo the changes. I do not want Git to ignore this file.
(Note: a totally hypothetical situation in order to explain the question.)
I'm an inexperienced programmer and I have hardcoded a date that is used to calculate the price of whatever. So today I changed that date, ran the code, and of course, Git tracked the change. I want to see that date the next time I run this code so I do not want to undo the change.
How can I tell Git to ignore that change as there is no point in staging/committing etc?
Sure, if I make other code changes then I do want Git to track.
In other words, how to tell Git that the changes that I have made since the last stage/commit are to be ignored/forget it/you didn't see it?