Commit Message Generation
Commit Message Generation provides quick and consistent commit messages by analyzing and summarizing changes in your staged files. Integrated into the Git Staging View, this tool provides an efficient way to summarize complex updates.
Generating a Commit Message
-
Open the GIT Staging View From the Eclipse menubar select:
Window > Show View > Other > Git > Git Staging -
Stage Your Changes
Select and stage the files you want to commit. -
Initiate Message Generation
Click the Copilot4Eclipse button on the toolbar just above the Commit Message textarea. Alternatively you can find a similar action available from the Staging View menu.
- Review and Revise Commit Message
Generated commit message text appears in the Commit Message textarea. Now it's your turn to review and customize the message text as needed. Next to the "Generate" button is a new "Clear" button. Use this button to quickly delete the current message.
Tips for Effective Use
- Review the Summary: The generated message provides a helpful starting point. It’s good practice to review and, if necessary, refine it to meet your team’s standards.
- Regenerate After Staging Additional Files: If you add more files to the stage, click the Message Generation button again to ensure your message reflects the latest changes.
How It Works
Copilot4Eclipse uses Copilot Chat to generate a brief commit message for each staged file by summarizing its individual diffs. If you have multiple staged files, Copilot4Eclipse uses Chat analysis to combine these individual messages into a single, cohesive commit summary.
Limitations to Keep in Mind:
- Max Diff Size: File diff descriptions exceeding 20K characters are abbreviated to that length.
- Max Staged Files: A maximum of 100 staged files can be processed
The Commit Message Generation feature streamlines the commit process and helps you maintain informative, clear commit histories!