简体   繁体   中英

Git not displaying changes committed or in history for some of the files

Not sure if this was answer somewhere as searching google or stack-overflow didn't helped so far (I might use the wrong keywords).

I'm new at using Git and have installed/tried Source-tree & Git Desktop to Pull/Push/commit from my git server.

The issue I face is that when I commit or go to check the history of the changes committed some of the changes are not displayed though the tool recognize they have changed (or are listed as committed and with change in the history). I only see the message: "This binary file has changed" rather than the code changed like I see on other files ( with the same extension ).

I'm under the impression the big files are the issue but can't confirm this.

Would someone know if this is normal behavior or if this can be fixed somehow?

Thanks.

Edit: the file types in my case are ahk (auto hot key) files but i'm not sure it matter)

Edit 2: testing with a text file of 200KB I get the same issue

After doing quite a few tests I figured out that the file encoding was UTF-16LE as it is different than the file encoding type of Git (UTF-8) it was not displaying the changes made in the tools like Git Desktop or Source Tree.

Converting a file to UTF-8 and doing some change in it solved the issue for this file.

Leaving this here in case someone else have the same issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM