The working copy "<app>" failed to commit files

After having to do a clean install of my system (macOS Monterey 12.7.3; Xcode 14.0.1), and restoring files using Migration Assistant, when attempting to commit my project (for the first time following the reinstall/restore), I get an error message:

The working copy "<app>" failed to commit files. error: invalid object 100644

I have tried some solutions recommended in these and other forums, such as doing an "xcrun git config" command from the console, but no luck.

When I add a file to the project (in a blind effort to solve the problem), sometimes the files mentioned in the error message change, but still, no commit.

I am eager to be able to move on with my project. I appreciate your help. Thank you.

I restored by project files directly (via copy) from my Time Machine backup. When I try to do a Commit, the commit message that shows up is different from what is in the .git folder of my project. Does Xcode have a setting somewhere to tell it where to look for the .git folder (other than the project folder)? Perhaps if I can get Xcode to look at the .git folder in my restored project folder things might work again.

The working copy "&lt;app&gt;" failed to commit files
 
 
Q