I can use
git whatchanged -p
to show a log of all the changes I've made to a repository with diffs inline.
I can use
git diff -b
or
git diff -w
to show a single diff that ignores various amounts of whitespace changes.
How can I pass that option to whatchanged in order to print out a list of changes I've made to my repository with inline diffs which ignores whitespace changes?
Examine carefully the output of git diff , and use the -w flag to ignore spaces. There's also options to show differences within a line. See Diffs within a line below. Note that you won't be able to tell git to skip the space changes when committing.
On github, you simply append the w=1 parameter to the URL for it to ignore whitespace.
Right click on base branch in the Git tab, and do reset. It will undo the commit and stage non-whitespaces changes for commit. Now commit and push -f (I always force push via command line). That's it, you are done!
What about using git log -p -w
? I believe that is the same output as whatchanged -p
.
If 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