When I use git diff
, I saw the differences like below:
- self.conv_2 = nn.Conv2d(C_in, C_out // 2, 1, stride=2, padding=0, bias=False)
+ self.conv_2 = nn.Conv2d(C_in, C_out // 2, 1, stride=2, padding=0, bias=False)
And I'm sure there are no white backspace difference in these two lines. However, I think these two lines are totally same.
I wonder why does git think they are different?
And is there a way to let git diff
show the special characters difference?
The --ws-error-highlight
flag might be useful.
git diff --ws-error-highlight=all
Alternatively, you can pipe the git diff
output to cat
and use its -A
flag to explicitly print a variety of non-printing characters.
git diff | cat -A
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