问题描述
我设置了两个不同的 bitbucket 帐户.一种用于工作项目,一种用于个人使用.在 BitBucket 中,我为不同的项目在每个帐户中设置了一个存储库.
I have two different bitbucket accounts set up. One is for work projects and one is for personal use. In BitBucket I have set up a repository in each of the accounts for different projects.
在 SourceTree 中,我有一些现有的个人项目正在同步到我在 SourceTree 上的个人存储库.在左侧面板中,我可以看到其中一个个人项目的开发"分支,在 BitBucket 的远程面板中,我可以看到远程存储库.
In SourceTree I have a few existing personal projects that are syncing up to my personal repository on SourceTree. In the left hand panel I can see my "Develop" branch for one of those personal projects and on the remote in BitBucket I can see the remote repo.
在 SourceTree 中,我没有看到将两个帐户分开的明显方法.例如,我在 SourceTree 中添加了工作存储库,但是当我尝试提交工作项目的初始版本时,它只给了我提交个人项目分支的选项.
In SourceTree I don't see an obvious way to keep my two accounts separate. For example, I have added the work repo in SourceTree but when I try to commit an initial version of a work project it only gives me the option to commit my personal project branch.
我现在如何在本地添加我的工作存储库并仅将这些工作项目同步到该工作 BitBucket 帐户上的存储库?
How can I now add my work repo locally and sync only those work projects into repos on that work BitBucket account?
推荐答案
对于 SourceTree 2.0.2+ 仅限 Mac 使用 GitHub 帐户:
For SourceTree 2.0.2+ on Mac only with GitHub accounts:
- 点击菜单文件->新建/克隆
- 在对话框中点击设置图标.
- 在出现的弹出菜单中点击设置
- 它带来了一个列出用户帐户的对话框.将您的其他帐户添加到列表中.
- 关闭对话框.
- 单击下图中工具上的远程按钮(本地旁边).
将列出您添加的所有帐户及其各自的存储库,并带有克隆按钮.
All your added accounts will be listed and their respective repositories with button to clone.
希望这会有所帮助.
这篇关于如何在 SourceTree 中使用两个不同的 BitBucket 帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!