Xcode 7不使用Git显示新的远程分支 [英] Xcode 7 doesn't show new remote branches using Git

查看:393
本文介绍了Xcode 7不使用Git显示新的远程分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Xcode 7中,使用Jira / Stash创建新的远程分支后,当我拉取主分支时,新分支用作可选原始分支。现在新的分支根本不出现,因此创建新的本地分支并不容易。



在您可以转到源代码管理>将鼠标悬停在当前工作副本>选择切换到分支并滚动查看新的原点/分支。一旦选择了,Xcode会自动创建一个本地分支。



现在我必须在本地手动命名/创建一个新分支并将其推送(创建)如果您正在工作,可能会导致很多冲突。副本不是主人。



有没有办法迫使Xcode通过终端查看所有远程分支,或者在Xcode中丢失了什么?

解决方案

好的,就像Xcode 7.1.1一样,它看起来像这是为了:


$ b $ 1在Jira / Stash中创建你的分支2)在Xcode中,去到源代码控制



3)选择拉



4)点击下拉菜单,你会看到新的origin / ...分支

<5>选择新的分支并拉动

6)转到源代码管理,将鼠标悬停在工作副本上,然后选择切换到分支...。
$ b $ 7在原始部分找到新的原点分支,我会创建一个新的lo cal分支

像Visual Studio这样的一些IDE可能会要求您拉取master以获取新的起源分支,但这似乎是现在在Xcode中完成的方式。



更新:看起来我没有自动刷新服务器状态选项,可以消除大部分步骤! (在Xcode中找到 - >首选项 - >源代码控制..除非这是最近在Xcode 7.3中添加的)


In Xcode 7, after creating a new remote branch using Jira/Stash, when I pull master, the new branch used to show up as an optional origin branch. Now newer branches don't show up at all, so creating a new local branch isn't as easy.

Before you could go to Source Control > hover over your current working copy > select "Switch to Branch" and scroll to see the new origin/ branch. Once that was selected, Xcode automatically created a local branch.

Now I have to manually name/create a new branch locally and push it up (Create) the remote branch which can cause a lot of conflicts if you're working copy isn't master.

Is there a way to force Xcode to see all the remote branches via the Terminal, or by something I'm missing in Xcode?

解决方案

Ok, so as of Xcode 7.1.1, it looks like the way to do this is to:

1) Create your branch in Jira/Stash

2) In Xcode, go to Source Control

3) Select "Pull"

4) Click on the dropdown and you'll see the new "origin/..." branch

5) select the new branch and pull

6) go to Source Control, hover over your working copy, and select "Switch to Branch..."

7) find the new origin branch in the origin section and you'll create a new local branch

Some IDEs like Visual Studio may require you to pull "master" to get the new origin branches, but this seems to be the way it's done now in Xcode.

UPDATE: It appears I didn't have "Refresh server status automatically" checked which would eliminate most of these steps! (found in Xcode -> Preferences -> Source Control .. unless this was recently added in Xcode 7.3)

这篇关于Xcode 7不使用Git显示新的远程分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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