Linked Questions
25 questions linked to/from Make 'git diff' ignore ^M
404
votes
13
answers
124k
views
Add only non-whitespace changes
I have my text editor to automatically trim trailing whitespace upon saving a file, and I am contributing to an open source project that has severe problems with trailing whitespace.
Every time I try ...
206
votes
15
answers
143k
views
What are these ^M's that keep showing up in my files in emacs?
I think it may have to do with TextMate, but we work in a small team and are having some issues with full-file conflicts of nearly identical files in git – in one branch the files have a ^M appended ...
508
votes
2
answers
224k
views
Git diff -w ignore whitespace only at start & end of lines
I love to use git diff -w to ignore whitespace differences. But, I just noticed that it ignores even whitespace differences in the middle of lines. How could I only ignore whitespace differences that ...
78
votes
1
answer
72k
views
git diff sees whole file as changed when it's not [duplicate]
The git diff engine is seeing a whole file as changed when it has not. For example, take this commit: https://github.com/etiago/phpvirtualbox/commit/626e09958384f479f94011ac3b8301bd497aec51
Here we ...
9
votes
3
answers
17k
views
git diff shows ^M with color ui true
I modified my .gitconfig in such a way that I have some colors when performing git diff:
$ cat .gitconfig
[color]
ui = true
I'm working on an ubuntu machine and I edited some code using VIM. After ...
7
votes
2
answers
3k
views
When I saved in Windows 7, git diff shows all the lines with ^M
I used Ubuntu to upload a repository to github.
I downloaded to windows 7 and using msysgit. When I saved some files in Windows without any changes.
When I do git status, they are listed as ...
1
vote
2
answers
3k
views
Git : See modified lines in Sublime text
How do i see modified lines inside Sublime text 3
4
votes
2
answers
1k
views
git: editing a file cause ^M to appear when using git diff
I have a couple of source files inside a local git repo. The files have been pulled from a remote git repo. When I do a "$git status" I see the following:
$git status
# On branch master
nothing to ...
1
vote
2
answers
2k
views
git format-patch and ^M at EOL
I am struggling to create a patch for a file which does contain some ^M at the end of a line.
when I edit the file I don't see the ^M, but the patch created by format-patch does point it out in the ...
0
votes
1
answer
1k
views
Pull request in git showing full diff for few files even though it has changes in few lines
Pull request in git showing full diff for few files even though it has changes in few lines. Dont know how to fix this problem. If there is any git command which will fix this pls let me know.
1
vote
1
answer
2k
views
git sees entire file as one line due to mac line endings
I am working on Windows platform, with files in Mac ANSI encoding
when I edit a single line of a file, and then do a git diff, this is what I see:
diff --git a/class.php b/class.php
@@ -1 +1 @@
-<...
0
votes
3
answers
2k
views
Git diff too much wrong changes
Im using a windows system to push my changes to a git linux server, where users commit with macOS, could this be the problem of invalid diff changes? changes which are not changes are displayed as ...
4
votes
1
answer
398
views
Don't display ^M (carriage return) in git grep output
To hide the awful ^M characters from git diff, one has to config:
[core]
whitespace = cr-at-eol
But they are still displayed in git grep output.
How to solve that?
EDIT -- The grep I'm running ...
0
votes
1
answer
984
views
Git diff is not working as expected in Android Studio?
In my Android Studio, changing a text in some line shows the whole file in the diff. Previously this worked properly; now it doesn't work.
I made multiple changes in settings so I can't identify ...
1
vote
0
answers
570
views
Git autocrlf is not changing line endings
I've seen a couple of posts on here talking about how ^M appears in diff's. Indeed, if I go on GitHub, run git show or git diff ... I see the entire file is changed, and it is treated as a single line....