GIT incorrectly monitoring changes to system files

I have a small playground approx 150 lines no SwiftUI

It also has a 70 line text file

Xcode now thinks I have over 4000 files that have changed and they are Xcode or system files

If I am looking at this list then the Mac Mini will freeze with a frozen mouse, just a stuck mouse pointer.

After a minute or so the Mac will reboot itself.

Any suggestions as to how to fix this would be appreciated.

I have already reinstalled Xcode and the tools and its still the same.

First, open your repo in another git app, such as SourceTree, and see if the other app shows the numerous changes. That will let you know whether your problem is an Xcode problem or a git problem.

You can remove the git repository and see if that fixes the problem. In the Finder, press Cmd-Shift-Dot to show hidden folders. The git repository is in a .git folder inside the playground folder. You will have to create a new git repository for the playground after removing the old git repo.

You should also add a .gitignore file to your git repository to ignore system files. An easy way to create a git ignore file is to go to the following URL:

https://www.toptal.com/developers/gitignore/

Enter Xcode in the search field and click the Create button to create a git ignore file.

Create a plain text file for the git ignore file and paste the contents of the git ignore file that you generated into the text file.

GIT incorrectly monitoring changes to system files
 
 
Q