Git Commit适用于XCode测试版,但不适用于正常版本 [英] Git Commit works with XCode beta but not with normal version

查看:109
本文介绍了Git Commit适用于XCode测试版,但不适用于正常版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有/使用Xcode 7.0 beta 5进行源代码控制,但是当我尝试在新安装的Xcode 7.0 GM中执行提交时,它不起作用。 (新的Xcode 7.0 GM取代了我之前的Xcode 6.4版本,它从来没有源代码管理工作。)我得到错误消息工作副本APP NAME无法提交文件,如下图所示:





这个问题类似于





但是对我来说它在beta Xcode版本中工作,只是不在标准版本中。



我尝试运行建议的命令lin e命令按照此答案,但没有明显差异。似乎必须有一些我可以编辑或替换的文件,但我不知道它在哪里。我的两个Xcode版本都使用相同的项目文件夹。



更新

git config --list 在项目目录中我收到以下内容(电子邮件已更改,但正确):

  user.email=my_correct_email@mymail.com 
user.name = Suragch
core.repositoryformatversion = 0
core.filemode = true
核心。 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

再次,我可以编辑项目在标准Xcode中,但为了更新git我必须返回到Xcode测试版。

解决方案

GI t config --list 给你本地和全局(和系统)git配置。



检查user.name是否仍然在本地注册repo: git config --local -l <​​/ code>



如果不是这样,XCode7测试版可能会认为不同$ HOME,而你的命令行使用普通的HOME(在你的user.name和user.email中你有一个.gitconfig)



只需尝试设置它们您的回购:

  cd / path / to / rpeo 
git config user.name Suragch
git config user.email my_correct_email@mymail.com


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:

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

user.email=my_correct_email@mymail.com
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.

解决方案

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 my_correct_email@mymail.com

这篇关于Git Commit适用于XCode测试版,但不适用于正常版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆