Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 454
null Avatar asked Jul 02 '12 08:07

null


People also ask

How do I push upstream in Eclipse?

To Push to Upstream, select the project/repo, select Team -> Push to Upstream.

How do I fix rejected non fast forward in Eclipse?

If you do a commit in one project and then accidentally push this commit, with bypassing code review, to another project, this will fail with the error message 'non-fast forward'. To fix the problem you should check the push specification and verify that you are pushing the commit to the correct project.

How do I change Git settings in Eclipse?

Click on the Window menu bar option, then choose Preferences. Type “git” in the search bar, then choose that path 'Team > Git > Configuration.


1 Answers

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.

like image 77
Phileo99 Avatar answered Oct 16 '22 22:10

Phileo99