Reputation: 11
I have a GIT repository hosted on Bitbucket. When commiting changes to the repo, Bitbucket sees these changes on the whole file (before it worked properly). So Bitbucket says 1 line added and 1 line removed.
Before pushing I check locally on differences with difftool (diffmerge). Here the changes are shown as normal.
core.autocrlf is set to true.
What is the problem here?
Upvotes: 0
Views: 341
Reputation: 11
The problem was the line end settings of the files after all.
I fixed all the files that needed conversion with dos2unix installed with brew:
brew install dos2unix
Changed line end settings on all files of the actionscript source folder with:
find . -type f -exec mac2unix {} \;
Then commited the changes
Upvotes: 1
Reputation: 6162
Not sure for 100% but it looks like git treats your file as the binary file. If you have some specific extension and you want to tell to git to treat it as the text file you can set it in .gitattributes file. Look here for more information. Also git could find some non-ascii characters (e.g. UTF16) in your file. In that case you can find solution here or here.
Upvotes: 0