While doing some refactoring, I renamed a variable from oldName to newName. Is there a way to tell the git diff command to ignore differences where oldName is now newName? I want to do this to focus in on only the other non-trivial changes. If this is possible, can I also specify more than one variable renaming to ignore, e.g., ignore changes from oldName1 to newName1 and from oldName2 to newName2 … ?
While doing some refactoring, I renamed a variable from oldName to newName . Is
Share
He is very correct, but of course you can grep the output of diff. Not the same thing, but depending on the magnitude of the change, perhaps usable.
In general, you should try to have your commits be one commit per concept. You can also split your pre-commits using
git add -p.