I am looking at a git diff, most of it is the same code moved from one file to another plus whitespace. How could I see the real differences? I tried git diff -b -C -C to no avail.
I came across this via a comment in another SO post, but it seems that since git v2.15 there is the ability to use git diff --color-moved to better differentiate between moved and changed code.
There is a nice example + screenshot showing it's usage on the GitHub git 2.17 release blog post too.
You can find the help/usage for it at https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---color-movedltmodegt
Related options include:
--color-moved[=<mode>] (modes: no, default, plain, blocks, zebra, dimmed-zebra)--no-color-moved--color-moved-ws[=<modes>] (modes: no, ignore-space-at-eol, ignore-space-change, ignore-all-space, allow-indentation-change)--no-color-moved-wsIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With