We are using git with Eclipse (graphic git). Our commit statements have a description and then a Change ID. Our description must have a JIRA story at the beginning.
My problem is I can never have more than one line in the commit or it will complain (see the image below). This is actually just one line but the word "field" wrapped around. You cannot get very descriptive with one line. Does anyone know a way around this?

While using Eclipse Oxygen.3a Release (4.7.3a) came across this issue.
Found Bug 471421 - Commit message warning in Git Staging View is wrong which contains the suggested work-around which did suppress the warning when entered a title of more than 50 characters:
Unselecting "Hard-wrap commit message" in Team/Git/Committing preferences panel solve the problem.
The Git docs says in git commit (emphasis mine):
Though not required, it’s a good idea to begin the commit message with a single short (less than 50 character) line summarizing the change, followed by a blank line and then a more thorough description. The text up to the first blank line in a commit message is treated as the commit title, and that title is used throughout Git. For example, git-format-patch1 turns a commit into email, and it uses the title on the Subject line and the rest of the commit in the body.
So git itself does handles several "physical" lines up to the first empty line as one "logical" line and displays this e.g. with git log --oneline. Other tools might or might not do that.
Therefore you can just ignore the warning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With