Problem : Here is the real Code Difference & in my commit in github is showing @@ -1,202 +1,251 @@
as this file has been replaced completely. I want to see the difference in code like the below image in github.
System Information : I am editing my code in windows 8.1 with sublime text 2 & in windows 7 with phpdesigner 7
Solutions, I tried before commit :
* text=auto
dos2unix
& unix2dos
commandsMy .gitattribute :
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
Thanks.
The problem is SOLVED.
What I did wrong
unix2dos
not in recursive mode.Solution
find . -type f -exec unix2dos {} \;
This will automatically change all files to crlf/windows formatAnd TADA, all working as it should be