Suppose there is a wrong commit version 02cb4fc done by mistake and we would like to remove it:
use git reset --hard fb67002 to restore to the previous version before it:
although 02cb4fc disappears from command line, it still exists in Eclipse Plugin.
In order to also remove the local commit version from Eclipse plugin, we have to use rebase command.
Example: Suppose we could like to remove commit history with description "version2":
resolve rebase error if any:
here we keep the latest version: version3:
Now rebase successfully done, we have the history information below:
for sure the highlighted version are not what we want to reserve:
Use git rebase --onto <target commit version, in my example it is the top commit fa47da9 > <the commit version you would like to remove, in this example it is af713a4 > HEAD:
After successful execution, use an arbitrary git reset command to trigger the refresh, and now you will find that the wrong commit history af713a4 is removed also from Eclipse History view: