null
null

Reputation: 9144

Eclipse Git Plugin: cannot Configure Push To Upstream

In eclipse, I have a project that connected with git repository. I can commit & remote push but the option: Team -> Remote -> "Configure Fetch from Upstream" and "Configure Push To Upstream" are disabled/grayed.

enter image description here

What actually happened??

How to enable them?

Upvotes: 16

Views: 9081

Answers (1)

Phileo99
Phileo99

Reputation: 5659

Here's what I did and this worked fine:

  1. Right click your project, choose Team→Show in Repositories View. You will switch perspectives and be in the Git Repositories tab.
  2. Right-click "Remotes" and choose "Create Remote". For "Remote name", enter "origin". Check "Configure Fetch" and "Check Configure Push". Click OK.
  3. Click Change. Enter your repo URL 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.

Upvotes: 28

Related Questions