David Seek David Seek - 1 month ago 10
Git Question

How to solve: Xcode shows files still as modified after commit

I am using SourceTree as a git client.

A while ago, I had a major problem with my project and my git, so I had to reactivate a copy of my workspace from an external source. For that purpose I had created a complete new repository. Commiting to that now.

Today I've noticed, that most of my files appear as "modified" in Xcode. Even after commit and push (with SourceTree).

enter image description here

Source Control shows my two branches, what is correct:

enter image description here

And the History shows perfectly all the commits:

enter image description here

My feeling tells me, that in the background the old repository information is still present and does this bug. How do I handle this? Help is very appreciated.

Edit:

git diff --ws-error-highlight=new,old
Output

enter image description here

Answer

Check if the nature of the diff is related to eol (end of lines).
See "git diff - show me line ending changes?", like:

 git diff --ws-error-highlight=new,old     

If that is the case, try first:

 git config --global core.autocrlf false

Then try again to clone your repo, and see if XCode still display those differences.

In your case, this is not about eol, but about an update done in your files.

Check for any .gitattributes file: is there a smudge directive in those files (which would explain an automatic process taking place on checkout)

See Keyword expansion for an example of smudge script.

Something seems to update JTAppleCalendar to its latest relase (6.0.1 from 7 days ago)

My feeling tells me, that in the background the old repository information is still present and does this bug.

Simply try, in command-line, to clone again that repo (in a brand new local path) and check if the issue persists in that new cloned repo.

to the JTAppleCalendar, I have changed from 6.0.0 to 6.0.1 manually. around 7 days ago. when the new xcode 8.0.1 arrived

In that case, all those files should be listed as modified: that is what Git does.

Comments