3

When enabling Git Repository Source Control for a new project on Xcode 7, it shows:

enter image description here

However, even after I setup user.name and user.email in terminal:

git config --global  user.name "John"
git config --global  user.email "john@example.com"

I checked and see from Terminal using

 git config --global -l

The result shows: enter image description here

I also checked local config in the project folder using:

 git config --local -l

user.name and user.email were not set locally.

But I still cannot commit and the same message from Xcode pop up. Any ideas what's going wrong? Please help!

John
  • 2,672
  • 2
  • 23
  • 29
  • In the config file of the GIT. Change the user.name and user.email values with your name and email in both local and global. Then try to commit and push. – Vamsi Ravi Sep 23 '15 at 16:57

2 Answers2

2

Found the solution:

  1. Go to project folder, look for ./git directory
  2. Open the file "config" with TextEditor.
  3. Terminal git config command seems not applied to this config file correctly.It was like this: enter image description here
  4. I changed it to enter image description here and saved.
  5. Commit and everything works!

Side Note: about how to find the hidden .git in project directory. Xcode 5 - remove source control for project Show hidden file in Mac

Community
  • 1
  • 1
John
  • 2,672
  • 2
  • 23
  • 29
0

In the terminal

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

$ git config --global user.email "Your email ID"
$ git config --global user.email
Your email ID

In the local(for a particular repository) In the terminal goto the working directory

$ git config user.name "Your Name"
$ git config user.name
Your Name

$ git config user.email "Your Email ID"
$ git config user.email
Your Email ID
Vamsi Ravi
  • 1,196
  • 8
  • 26