1

I am using Windows - GitToitise. When I do my git commit the file is 0 line add and remove. enter image description here

I go to the git diff end line also same enter image description here

but still show modified, what goes wrong? I don't want to commit unedited file to my git repo.

My git config

git config core.fileMode false
git config core.autocrlf true

I download the source code from cPanel. and my working environment is Windows.

Shiro
  • 7,344
  • 8
  • 46
  • 80
  • file permission – Danh Dec 30 '16 at 09:00
  • I also added `git config core.fileMode false` but still appear – Shiro Dec 30 '16 at 09:02
  • One thing you could do is to check to verify if the files really are identical is to inspect the binary version of the file. E.g., (assuming unix shell): `cat wp-content/themes/index.php | hexdump` and `git show HEAD:wp-content/themes/index.php | hexdump` Are those hex dumps identical? If not, the files are different. – Alderath Dec 30 '16 at 09:39

1 Answers1

1

I also added git config core.fileMode false but still appear

If git -c color.diff.whitespace="red reverse" diff -R -- afile shows anything (as in here), it is eol-related, and you would need to type:

git config --global core.fileMode false

And then clone again your repo in another folder, to see if the problem persists.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250