Git Commit works with XCode beta but not with normal version
I had/have Source Control working with Xcode 7.0 beta 5, but when I try to do a Commit in my newly installed Xcode 7.0 GM it won’t work. (The new Xcode 7.0 GM had replaced my previous Xcode 6.4 version, which never had Source Control working.) I get the error message
The working copy "APP NAME" failed to commit files as is seen in the following image:
This question is similar to
- XCode Won't Commit To GIT
- Xcode and Git Source Control : “The working copy XXXXX failed to commit files”
but for mine it does work in the beta Xcode version, just not in the standard version.
I tried running the suggested command line commands as per this answer, but there was no noticeable difference. It seems like there must be some file I could edit or replace, but I don’t know where it is. Both of my Xcode versions use the same project folder.
git config --list inside the project directory I get the following (email changed, but correct):
email@example.com user.name=Suragch core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true core.precomposeunicode=true remote.MongolAppDevelopment-iOS.url=https://github.com/suragch/MongolAppDevelopment-iOS.git remote.MongolAppDevelopment-iOS.fetch=+refs/heads/*:refs/remotes/MongolAppDevelopment-iOS/* branch.master.remote=MongolAppDevelopment-iOS branch.master.merge=refs/heads/master
Again, I can make edits to the project in the standard Xcode but in order to update git I have to go back to the Xcode beta.
One Solution collect form web for “Git Commit works with XCode beta but not with normal version”
git config --list gives you local and global (and system) git configs.
Check if user.name is still registered in the local repo:
git config --local -l
If not, it is likely that the XCode7 beta consider a different $HOME, while your command line uses the regular HOME (in which you have a .gitconfig iwth your user.name and user.email)
Simply try and set those in your repo:
cd /path/to/rpeo git config user.name Suragch git config user.email firstname.lastname@example.org