For some reason my editor looks like it is occasionaly changing changing the line endings of my source files. When I do 'git diff', all i get is a mysterious empty '-' followed by a '+', but no information to confirm this was teh actual change. How do I get git diff to show me what this change actually was ?
A:
Very vague. But the best advice would be to use an editor that is aware of differing lineend characters/sequences. vi is a good choice. notepad is not.
David Watson
2010-10-13 04:00:33
Thanks, I'm using Vim, however somehow it's playing tricks. I'd like to know how to get git to tell me what the changes were.
Stonky
2010-10-13 04:03:31
A:
use "git diff -w" to review the diff without whitespace change such as \r, \t etc
also with "git log -p -w" or "git show -w"
Cotton
2010-10-13 07:03:46
Yes - but I want to see the whitespace change, and what whitespace was changed to what other whitespace.
Stonky
2010-10-14 23:10:58
use "git difftool" to review diff with default difftool which vimdiff; After launch vim, use command "set list" to trigger viewing of whitespace; Also "set listchars=" to specify the including of whitespace, use command "help listchars" to see more
Cotton
2010-10-15 04:07:49
A:
Sometimes a graphical diff tool will show you the change better -- try git difftool
.
bstpierre
2010-10-13 17:04:02