Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git(hub)初学者问题_Git_Github - Fatal编程技术网

Git(hub)初学者问题

Git(hub)初学者问题,git,github,Git,Github,在使用Github进行第一个项目时,我遇到了一些问题。我开始使用xCode源代码控制,但后来改用终端 1) 当我试图查看我的远程目录时,似乎有重复项 $ git remote -v NavCtrl https://github.com/.../projectabc.git (fetch) NavCtrl https://github.com/.../projectabc.git (push) NavCtrl https://github.com/.../projectabc.git (fetch

在使用Github进行第一个项目时,我遇到了一些问题。我开始使用xCode源代码控制,但后来改用终端

1) 当我试图查看我的远程目录时,似乎有重复项

$ git remote -v
NavCtrl https://github.com/.../projectabc.git (fetch)
NavCtrl https://github.com/.../projectabc.git (push)
NavCtrl https://github.com/.../projectabc.git (fetch)
NavCtrl https://github.com/.../projectabc.git (push)
删除其中一个是否安全,因为它们具有相同的确切名称

2) 当我推的时候,我的使用有什么不同吗

$ git push origin master


3) 我可以安全地继续使用终端,而不用在xCode中执行任何操作吗。换句话说,我是否必须以某种方式从xCode中删除源代码管理以避免遇到问题?如果是,我该怎么做?

1/是,您可以通过编辑repo中的
.git/config
文件来删除复式输入

2/
git push origin projectabc/master
将本地分支机构
projectabc/master
推送到远程回购原点。
最好坚持使用
git-push-origin-master
(或者更好:第一次推送使用
git-push-u-origin-master
,下一次推送使用
git-push
:请参见“”)


3/理论上,是的:这取决于您的XCode版本,但它(XCode)使用命令行修改后,应能够与新的git回购状态同步。

remote.projectabc.url=remote.projectabc.fetch=+refs/heads/*:refs/remotes/projectabs/*branch.master.remote=projectabc branch.master.merge=refs/heads/master branch.Assignment3.remote=projectabcbranch.Assignment3.merge=refs/heads/projectabc remote.origin.url=remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*我应该删除哪一个?@BorisR实际上在这种情况下,没有:您有两个远程设备(projectabc和origin)。在这方面,
git remote-v
的输出是预期的。感谢所有的帮助@沃克
$ git push origin projectabc/master