Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: Git how to push after a local commit

Tags:

git

eclipse

push

I sometimes realize a local commit with Eclipse and then decide to push my project but Eclipse offers me only two solutions "Commit and Push" or "Commit".

The problem is I cannot make a "commit and push" if I haven't changed anything after my "Commit".

Fair enough, I only have to change a line on my code and can push it but it seems to me like an awkward solution. Is there a better way to do so?

like image 942
Jean Avatar asked Dec 11 '22 07:12

Jean


2 Answers

You can always just open Eclipse's built-in terminal (or any other terminal app) and execute: git push.

On a side note: getting used to using git on the command line enables you to easily switch between different IDEs and editors without having to re-learn the respective quirks of the git integration of the IDE de jour every time you switch.

like image 111
anothernode Avatar answered Dec 19 '22 02:12

anothernode


In the Package Explorer, Project Explorer, etc. right-click the project folder and choose Team > Push to Upstream.

Alternatively, you can use Quick Access (Ctrl+3) and enter push to upstream (assuming a file of a Git repository is selected or opened).

For a Git main menu and Git icons in the main toolbar, in Window > Perspective > Customize Perspective..., in the tab Action Set Availability check the checkbox Git.

like image 45
howlger Avatar answered Dec 19 '22 04:12

howlger