Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
470 views
in Technique[技术] by (71.8m points)

ios - 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:

enter image description here

This question is similar to

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.

Update

Typing git config --list inside the project directory I get the following (email changed, but correct):

[email protected]
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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 [email protected]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...