bitwise bitwise - 7 months ago 70
Git Question

Sourcetree listing unmodified files as modified for Bitbucket repository

I just reinstalled my OS and copied my repositories back to disk. 2 Bitbucket, and 1 Github. Then, I installed SourceTree and added both accounts(Github and Bitbucket). Finally, I used the "Add Existing Local Repository" function of SourceTree to add all three repositories.

Now, while everything seems fine with my Github repository, SourceTree is listing every single file in both Bitbucket repositories as modified, even though most of them have not been modified. Selecting any of the supposedly modified files in SourceTree's "File Status" section shows an empty box in the diff on the right.

What's going on here?

Edit: DiffMerge confirms the files that SourceTree things are modified, are identical to the remote.


The problem was that I had copied my repo to/from a drive that didn't support unix style permissions(ExFat). So after the round-trip, the permissions had been reset to default(777), which was detected by git as a difference.

777 includes execute permissions, which was not originally present for my files(they were 666 - read/write).

The solution was to run the following command on my repository, which removed the extra execute permissions from all files:

find . -type f -exec chmod 666 {} +

The above command targets files only, because execute permissions are required for folders to be traversable.