What are the necessary settings for "git configuration"?

7.4k Views Asked by At

when I create a project in Xcode 4.3 it keeps on displaying message saying below.I did not get what that means and how to do the necessary settings. Any help will be greatly appreciated. Thanks Baha

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 say the identity only in
this repository.
fatal:unable to auto-detect email address
(got 'Home@s-imac-3.(none)")`
4

There are 4 best solutions below

1
On

It's telling you literally, exactly what to do. Open a Terminal session, and run this, replacing '[email protected]' with your email address:

git config --global user.email "[email protected]"

This sets your email address for git, it uses this to identify who you are in commits.

Then, run this, replacing 'Your Name' with your name:

git config --global user.name "Your Name"

This sets your name for git commit messages, it uses this to give a more readable name to commits.

If this stuff is not clear to you, you really owe it to yourself to learn git: http://try.github.io

1
On

Set Name & Email in Xcode preference, this issue will be resolve

Follow these 4 simple steps

  1. Xcode => Preferences => Source control => Git
  2. Set ( Author Name ) & ( Author Email ), just for identify that the code committed by this name/email
  3. close Xcode and re-open project
  4. now try to commit code, it should be working fine now.

enter image description here

0
On

I had same issue in xCode 8.3.2, when I tried to create git repository on local machine. And I fixed it by setting local repository name and email. If anyone is having same issue; just run these commands in terminal:

  • cd my/project/directory (Navigate to project directory)
  • git config --local user.email "[email protected]"
  • git config --local user.name "myname"

NOTE: This is for local repository, and "--global" flah can be used for remote repositories.

0
On

Could be a issue with Xcode. Go to your git directory and set the user locally. See the following help thread at Apple Forum for more info:

https://forums.developer.apple.com/thread/18189