从github导入所有分支 [英] import all branches from github

查看:186
本文介绍了从github导入所有分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在大学计算机上设置了egit来与我的GitHub存储库一起使用。

存储库有5个分支,其中包括master,而我的本地副本也有这些分支,因此我可以转到团队->切换到并在Eclipse中选择所需的分支。

I set up egit to work with my GitHub repo on my university computer.
The repo has 5 branches including master and my local copy also has those branches so I can go to Team -> Switch to and select the desired branch in eclipse.

在笔记本电脑上,我设置了Egit并克隆了存储库。

我在导入时选择了所有分支,但是在git存储库选项卡的Local下它只有master分支,所有其他分支都在Remote Tracking之下。

如果我切换到Remote Tracking分支进行更改,请提交并然后推送,我得到以下错误:

On my laptop I set up Egit and cloned the repo.
I selected all branches when importing however under Local in the git repositories tab it only has master, all the other branches are under Remote Tracking.
If I switch to a Remote Tracking branch make a change, commit and then push I get the following error:

An internal Exception occurred during push: Nothing to push.

有人知道我在做什么错吗?
谢谢

Anyone know what I am doing wrong? thanks

推荐答案


如果我切换到Remote Tracking分支进行更改,请提交然后推送我得到以下错误

If I switch to a Remote Tracking branch make a change, commit and then push I get the following error

您没有从您刚刚切换到的远程跟踪分支创建本地分支。 br>
这意味着您处于分离了 HEAD 模式,因此是无事可做。

请参见 Git课程:要注意分离的头部

You didn't create a local branch from your remote tracking branch you just switch to.
That means you are in a detached HEAD mode, hence the "nothing to push".
See "Git Lesson: Be mindful of a detached head":

(否 HEAD :)

Team -> Switch To -> New Branch

足以解决问题,然后将其推送到远程。

will be enough to fix the issue, and then push it to the remote.

(新分支上的 HEAD :)

这篇关于从github导入所有分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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