Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 7 GM can't commit (GIT)

Tags:

Whenever I try to commit, using source control in Xcode, I get an error that I need to configure my email address and name (it seems to read my email address incorrectly). I went to the Terminal, and entered them (again). The error didn't go away.

I can commit normally in Terminal, but not in Xcode. Is there a way to fix it? Or enter the configuration info directly in Xcode?

This is the error message:

*** Please tell me who you are.

Run

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'myemail@gmail-1040826.(none)')

Here's my .gitconfig (I replaced my actual name with "My Name", and my username with "myname" for privacy reasons):

myname-1040826:Project myname$ git config -l
[email protected]
user.name=My Name
filter.media.clean=git-media-clean %f
filter.media.smudge=git-media-smudge %f
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
submodule.PeerKit.url=https://github.com/jpsim/PeerKit.git
like image 837
coopersita Avatar asked Sep 12 '15 22:09

coopersita


2 Answers

It looks like Xcode is not reading global GIT settings. If you encounter this issue, set your name and email to the specific project via the Terminal:

git config user.email "[email protected]" 
git config user.name "Your Name"

Note: Make sure you are in the project's directory when you do the above.

like image 124
coopersita Avatar answered Sep 22 '22 03:09

coopersita


It's not only the matter in global settings, the real problem are local ones.

Try this.

cd your/project/directory
git config --local user.email "[email protected]"
git config --local user.name "yourName"

This worked for me.

like image 32
STIFFMEISTER Avatar answered Sep 24 '22 03:09

STIFFMEISTER