Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Eclipse/EGit how can I see unpushed commits?

Tags:

git

eclipse

egit

Using Eclipse (EGit) how do I see/review commits that haven't been pushed to origin yet?

This is what the history looks like:

EGit History view

like image 673
Grzegorz Oledzki Avatar asked Jan 30 '14 15:01

Grzegorz Oledzki


People also ask

How can I see Unpushed commits?

We can view the unpushed git commits using the git command. It will display all the commits that are made locally but not pushed to the remote git repository.

How can you view all the commits for a single file in eclipse?

Select a file or directory in the Editing page, and choose Git Log in the Actions menu. This will show all commits in your current local branch that involve changes to the chosen file or directory.

How do you delete a commit in EGit?

RightMouse on that commit and "reset -> Hard" (will reset all your commits AND local workspace changes to the selected commit). you should see the up-arrow changing into an down-arrow, meaning that your commits are deleted and that your repository is outdated.


1 Answers

Go to Window->Show View->Other->GIT->Git Reflog

There you'll see the commits that both have been pushed and those that aren't pushed, but wont differentiate between them.

Better is to use the Egit equivalent of Gitk:

Right click on the Project choose Team->Show in history. For each commit you'll se which branches that commit is available on. If it only says <tree-name> and not origin/<tree-name> it means that it isn't pushed.

like image 176
Daniel Figueroa Avatar answered Sep 24 '22 17:09

Daniel Figueroa