Best I can tell, GitHub for Windows doesn't properly recognize file differences that only vary by line endings (at least in the scenarios I've found). I had multiple javascript files that consisted of something like:
- (function(){
- function foo(){
- return 'bar';
- }
- )();
+ (function(){
+ function foo(){
+ return 'bar';
+ }
+ )();
Which, at first glance didn't make sense. Then, after I looked in to it, the variance was the file went from a \r\n
line ending to \n
(or the inverse). FWIW, I have the following setup in .gitattributes
:
* text=auto
However, I was able to resolve it by using the shell. First, a git status
showed me I did, indeed, have several files with modifications (and git even told me they varied by line endings):
.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Project/Path/file.js
then, i used git commit -a
to add those files, and finally git push
to send them up to the repository. I now (even according to GitHub for Windows) have a syncd branch.