Is there any size limit to the Git commit message? I searched trough the web but cannot find any relevant mention about this except this one.
However, that one does not answer my question.
The maximum lengths of the subject and message body can be configured in the standard Gerrit config file gerrit. config . The defaults are 50 characters for the summary and 72 characters for the description, as recommended by the git tutorial and expanded upon by Tim Pope.
Short (72 chars or less) summary More detailed explanatory text. Wrap it to 72 characters. The blank line separating the summary from the body is critical (unless you omit the body entirely).
The 72-character limit This git commit message guideline means you have to concertedly add a carriage return when the body of your commit message approaches 72 characters.
A commit in GitHub is described as a saved change. A commit message explains what change you made to your project. It is greatly important to learn how to make a good commit message no matter if it is a personal or professional project.
Empirically, I think the answer is no. This worked (that's a ~100MB commit message):
yes | head -c 100000000 | git commit -F - > /dev/null
Command parts explanation:
yes
repeats "y\n"
foreverhead -c 100000000
takes only the first 100,000,000 bytes (~100MB)git commit -F -
commits with the passed-in commit message (this won’t work if you haven’t staged any changes to commit)> /dev/null
hides the output from the command, which includes Git repeating back the very long commit messageIf 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