After pushing commit to github, code changes showing wrong
<p><strong>Problem :</strong> Here is the real <a href="https://www.diffnow.com/?report=5ro0d" rel="nofollow noreferrer">Code Difference</a> &amp; in my commit in github is showing <code>@@ -1,202 +1,251 @@</code> as this file has been replaced completely. I want to see the difference in code like the below image in github.</p>

<h2><a href="https://i.stack.imgur.com/yY2ne.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yY2ne.jpg" alt="enter image description here"></a></h2>

<p><strong>System Information :</strong> I am editing my code in windows 8.1 with sublime text 2 &amp; in windows 7 with phpdesigner 7</p>

<p><strong>Solutions, I tried before commit :</strong></p>

<ul>
<li>Changed the Line formatting settings in my editor to windows/unix/macOSx</li>
<li>In my .gitattribute added <code>* text=auto</code></li>
<li>I have also tried <code>dos2unix</code> &amp; <code>unix2dos</code> commands</li>
<li><strong>Strangely, If I edit using vi, it works. But, I am not comfortable using that.</strong></li>
</ul>

<p><strong>My .gitattribute :</strong> </p>

<pre><code># 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
</code></pre>

<p>Thanks.</p>