Bitbucket和GitHub都使用GitHub for Windows [英] Use GitHub for Windows for both Bitbucket and GitHub

查看:141
本文介绍了Bitbucket和GitHub都使用GitHub for Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以一次使用GitHub for Windows用于Bitbucket和GitHub?



例如,我可以在程序中显示的两个站点上都有回购协议,并且当我提交/同步回购时,它会推送到相应网站上的相应回购?

解决方案

不,如果您的意思是:使用两个遥控器(一个GitHub和一个Bitbucket)。
您只能使用该客户端定义一个远程设备,它将是一个GitHub或一个Bitbucket。






是的,如果您限制为一个远程,则可以使用适用于Windows的GitHub和任何上游回购协议。

添加上游回购的过程是和 git:<凭证缓存'不是git命令,关于该凭证缓存机制的更多信息,最近在Git 1.7.9 +中介绍)



您在本地执行的任何修改都会被GitHub for Windows客户端选取(您可能需要退出回购(GitHub for Windows客户端左上角的左箭头,然后再次单击本地Bitbucket存储库:这将触发刷新):





下一个屏幕截图的关键字为 发布 (而不是推送给Gi tHub )。

这是因为远程origin是一个https。





点击发布,你会看到您的回购状态设置为同步



赶上bitbucket.org检查GitHub for Windows是否确实推送到Bitbucket:




Is it possible to use GitHub for Windows for both Bitbucket and GitHub at once?

For example, can I have repo on both sites show up in the program, and when I commit/synch a repo, it push to the respective repo on the respective website?

解决方案

No, if you mean: having a local repo with two remotes (one GitHub and one Bitbucket).
You can define only one remote with that client, and it will be either a GitHub one or a Bitbucket one.


Yes, if you limit to one remote, you can use GitHub for Windows with any upstream repo.

The process of adding an upstream repo is now easier with the (constantly) updated GitHub for Windows app:

select the URL and then drag the text from your browser, and drop it into the GitHub for Windows app. It will automatically add the repository.


(Original answer February 2013)

In order for "GitHub for Windows" to publish (instead of "pushing to GitHub"), you need to define a remote "origin" (in the settings of your local repo) using the https address of the Bitbucket repo:

https://user@bitbucket.org/user/repo

So if you create a local repo through "GitHub for Windows", you can add, through its settings, the right remote:

Note that the first refresh will trigger a login screen, in order for you to enter your http credential you are using on bitbucket.org: they will be cached (and encrypted) by GitHub for Windows for the duration of your current session.

(See "Password Caching" and "git: 'credential-cache' is not a git command", for more on that credential caching mechanism, recently introduced with Git 1.7.9+)

Any modification you are doing locally will be picked up by the GitHub for Windows client (you might need to exit the repo (left arrow in the top left corner of the GitHub for Windows client, and click again on your local Bitbucket repository: that will trigger a refresh):

The key in the next screenshot is in the word "publish" (instead of "push to GitHub").
That is because the remote "origin" is an https one.

Click on "publish" and you will see your repo status set to "in sync":

Rush to bitbucket.org to check if, indeed GitHub for Windows did push to Bitbucket:

这篇关于Bitbucket和GitHub都使用GitHub for Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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