GitHub – why two lines are marked as different without any visible differences?

Here’s the commit cba438 on Github.

As you can see line #1 in index.html is marked as changed:

  • Github commit, diff does not show changes
  • Saving the entire git diff between two commits in a text file
  • Can SourceTree show diff side-by-side
  • Why does git difftool use git diff instead?
  • Large github commit diff not shown
  • Using Visual Studio 2012's built-in merge tool with Git
  • But as I can see there’s no single changed character. Is it up to GitHub or Git? Is it a bug or some hidden character was changed?

  • what does cvs2git need from a CVS repository?
  • How to make git feature branches work with jenkins-workflow?
  • git merge, keep both
  • Multiple repos with single submodule
  • git revert in Egit
  • git.exe has been suddenly gone on Windows
  • 2 Solutions collect form web for “GitHub – why two lines are marked as different without any visible differences?”

    Yes, there is a hidden character there, a UTF8 BOM.

    $ git show cba438:index.html | od -c | head -1
    0000000 357 273 277   <   !   d   o   c   t   y   p   e       h   t   m
    $ git show cba438~1:index.html | od -c | head -1
    0000000   <   !   d   o   c   t   y   p   e       h   t   m   l   >  \n
    

    Related SO question: What’s different between UTF-8 and UTF-8 without BOM?

    enter image description here

    Looks like a whitespace at the end of the deleted line.

    Git Baby is a git and github fan, let's start git clone.