39

I've just updated to Xcode 7 general release and ive tried committing files. Its failing however, and im getting the following message;

enter image description here

Ive seen this question but the secondary response is different in the OP question: Xcode and Git Source Control : “The working copy XXXXX failed to commit files”

Whats the 'helper application' that it is looking for and whats the solution? Migrating to Xcode 7 and iOS9 is becoming a headache :( I commit my files by going to 'Source Control' -> 'Commit'

Community
  • 1
  • 1
DevC
  • 6,982
  • 9
  • 45
  • 80

6 Answers6

81

Turns out the “helper application” is in fact Git. For some reason Xcode 7 is eager to associate you (the committer) with a name and an email address.

To fix it, on the command line, type the following:

xcrun git config --global user.email you@yourdomain.com
xcrun git config --global user.name "Your Name Here"
Rukshan
  • 7,902
  • 6
  • 43
  • 61
  • 1
    I recently ran into this and found that if I restarted xcode then I was able to do the commits just fine. – Micah Montoya Feb 01 '18 at 13:56
  • 2
    I had the same problem with Xcode 9. After having read your advice, I simply went to Preferences → Source Control → Git and replaced the "Author Name" and "Author Email" fields with the same content they already had. This apparently had the same effect as the shell commands. – Stefan Mar 06 '18 at 16:05
  • One should be careful about using --global though as this sets the info for all projects, and that might not be what you want. To set it to a specific project, locate your project inte the terminal, then simply omit the global command: `git config user.name "myName"` – Joakim Sjöstedt Feb 05 '21 at 13:29
  • I did what micah wrote about just restarting the xcode and it worked fine for me as well and i was able to do a commit and push. thanks! – Appy Sharma May 29 '22 at 20:50
19

If the above mentioned solutions don't work, try this one:

Add changes once with a git command. Use terminal and change to your working directory (that contains a /.git folder) and execute:

git commit -a -m "Commit title here"

After that commit via Xcode should work again.

Pat_Morita
  • 3,355
  • 3
  • 25
  • 36
14

I had the same problem.

This fixed my problem: Quit Xcode(using CMD+Q) & run it again.

Ahmadreza
  • 6,950
  • 5
  • 50
  • 69
7

The above solution did not work for me. I am running on Xcode 8 (8C1002) and I have close to 4500 files to commit at once (adding the sources of a library to my project).

The only way I can make it working (without the error message) is by committing smaller number of files multiple times instead of all at once.

Mickael T
  • 895
  • 2
  • 8
  • 19
4

This happens to me when I add new image assets. The "fix" is to go to File > Save BEFORE you do a Git Commit. Then the Commit works Fine.

1

first you check in command line follow this picture .If git is clean (add . + commit done)

enter image description here

enter image description here

also have problem same you ForceQuit Xcode and open again

Papon Smc
  • 576
  • 4
  • 11