从 github 导入所有分支
我在大学计算机上设置了 egit 来使用我的 GitHub 存储库。
该存储库有 5 个分支,包括 master,我的本地副本也有这些分支,因此我可以转到 Team ->切换到 并在 eclipse 中选择所需的分支。
在我的笔记本电脑上,我设置了 Egit 并克隆了存储库。
我在导入时选择了所有分支,但是在 git 存储库选项卡中的本地下,它只有主分支,所有其他分支都在远程跟踪下。
如果我切换到远程跟踪分支进行更改,提交然后推送,我会收到以下错误:
An internal Exception occurred during push: Nothing to push.
有人知道我做错了什么吗? 谢谢
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.
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有从您刚刚切换到的远程跟踪分支创建本地分支。
这意味着您处于 分离的
HEAD
模式,因此“无需推送”。请参阅“Git 课程:注意分离的头部”:(
无
HEAD
:)足以解决问题,然后将其推送到远程。
(新分支上的
HEAD
:)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":
(No
HEAD
:)will be enough to fix the issue, and then push it to the remote.
(
HEAD
on the new branch:)