eclipse team没有选项,Eclipse / Egit,推送至远程菜单选项变灰

I created a repository on GitHub. I set up a local git repository using Eclipse and Egit.

With Team > Remote > Push. I managed to push the local repo to the one on GitHub.

Now I expected to be able to use the Team > Push to Upstream (as well as fetch from upstream) as a one-click push (and pull/fetch), but this menu choice is not available (grayed out). I have to use Team > Remote > Push to each time manually fill in the info (ctrl+space helps).

Following this, I created a remote configuration and pushed from the repositories view, and I can see the remote GitHub repository listed under Remotes but still the Team > Push to Upstream command is grayed out in the menu.

Could someone please give me a hint as to what I have may done wrong?

解决方案

Here's what I did and this worked fine:

Right click your project, choose Team→Show in Repositories View. You will switch perspectives and be in the Git Repositories tab.

Right-click "Remotes" and choose "Create Remote". For "Remote name", enter "origin". Click OK.

Click Change. Enter your information as you did during your initial push. Click Save.

You should now be able to push by merely right-clicking on your project, then Team→Push to Upstream.

Because the remote was added under the project in question, each project can have its own upstream origin and they will not interfere (whereas the Window > Preferences solution is a global setting).

Based on your description of what you did, it appears you attempted this - but possibly did not use the name "origin" for the remote, which is absolutely necessary. I stumbled across this solution by pure chance.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值