Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select an earlier commit message when commiting in EGit in Eclipse IDE?

Tags:

git

eclipse

egit

In EGit inside Eclipse IDE, I am missing the feature of a "commit message history", ie. being able to select one of the most recent commit messages for a new commit, a feature that I quite often use in CVS/SVN.

I see that in Eclipse IDE preferences at Git > Committing there ist a "Maximum number of commit messages in history". This hints at such a feature being present.

I just could not find/google how to access it? What would that option do otherwise? I also find my recent commits stored in the workspace metadata in a file called org.eclipse.egit.ui.prefs.

Please note that this is NOT about viewing the history of commits in the past, and therefore to my knowledge not a duplicate question!

like image 582
JRA_TLL Avatar asked Mar 07 '18 12:03

JRA_TLL


People also ask

How do you change commit message after commit in Eclipse?

open the Staging View or Commit Dialog again and select the option Amend previous commit in the toolbar. See also this tutorial: Git amend allows to adjust the last commit. For example you can change the commit message.

How do you commit an EGit?

If you want to commit the changes to your repository, right click the project (or the files you want to commit) and select Team => Commit… . This will open a new window, allowing you to select the files you want to commit. Before you can commit the files, you will have to enter a commit message in the upper textbox.

How do I change an already committed message?

On the command line, navigate to the repository that contains the commit you want to amend. Type git commit --amend and press Enter. In your text editor, edit the commit message, and save the commit. You can add a co-author by adding a trailer to the commit.


1 Answers

With the cursor in the "Commit message" box, press Ctrl+Space to show a list of previous commit messages. Select one and the "Commit message" box will be populated with that message.

Screenshot showing old commit messages

like image 183
Azquelt Avatar answered Sep 17 '22 21:09

Azquelt