如何使用 Visual Studio 17 从现有 Bitbucket GIT 存储库中提取数据?
Error "git 因致命错误而失败。找不到“xyz”存储库 "
- I added 这个迷雾 https://marketplace.visualstudio.com/items?itemName=MistyK.VisualStudioBitbucketExtension比特桶扩大从市场上
- Then I added the Git remote string as below with three types of options and this help page https://confluence.atlassian.com/bitbucket/change-the-remote-url-to-your-repository-794212774.html.
首先我尝试了这个字符串 ->https://<repo_owner>@bitbucket.org/<accountname>/<reponame>.git
& https://<repo_owner>@bitbucket.org/<accountname>/<reponame>
然后我尝试了基于 youtube 视频和设置页面的 URL 路径https://bitbucket.org/myrepo/xos/src
- 我收到错误消息,指出存储库不存在。
希望获得有关如何从 Bitbucket 设置/拉取/获取/同步代码的帮助。
Update 1: the error after adding the Clear Credentials Tool & extracting the SSH
Update 2: @Marina-Liu, even after hitting connect, bitbucket connection does NOT show in Visual Studio 2017
如果您是 bitbucket 存储库的用户,请确保您有权克隆私有存储库。然后您可以将 bitbucket 存储库的更改拉取到本地现有存储库。
- 登录比特桶。
VS -> 管理连接 -> 登录 bitbucket 存储库。
您还可以在登录后直接克隆 bitbucket 存储库。
- 将 bitbucket 存储库添加为远程。
在 VS 中 -> 打开本地存储库 -> 在 VS 的右下角 -> 它列出了你的存储库文件夹名称和分支名称 -> 团队资源管理器 -> 设置 -> 存储库设置 -> 添加远程 -> 添加远程名称(例如bit
) -> 输入你的 bitbucket repo url (格式为https://bitbucket.org/account/reponame
) -> 保存。
- 将更改从 bitbucket 存储库拉取到本地现有存储库。
首先从 bitbucket 存储库中获取更改:
Team explorer -> Sync -> Fetch -> 选择刚刚添加的远程名称(如bit) -> Fetch。
如果本地现有存储库没有原始远程存储库,您可以直接从 bitbucket 存储库中提取更改。如果本地仓库有其他远程仓库,除了bit
,您应该将 bitbucket repo 的更改合并到本地分支中:
团队资源管理器 -> 分支 -> 合并 -> 假设合并bit/master
into master
分支->合并。
要通过命令行克隆 bitbucket 存储库,您可以按照以下步骤操作:
- 清除现有凭证
凭证管理器 -> Windows 凭证 -> 删除有关 bitbucket.org 的所有凭证
- 通过命令行克隆
现在您可以通过命令克隆 bitbucket 存储库git clone https://bitbucket.org/account/reponame
直接,它会让您输入您的电子邮件地址和密码。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)