Contents
How long should a commit message be in Git?
For the rest of the commit message, keeping the max line length to 72, 78, or 80 chars max can also be helpful, like if you often split your monitor screens with a terminal in one half and a browser or editor in the other half. Many editors have shortcuts that will auto-wrap long lines to a max column length for you.
Where are git commit messages stored in Magit?
Git then cancels the commit, but leaves the file untouched. In addition to being used by git commit, messages may also be stored in a ring that persists until Emacs is closed. By default the message is stored at the beginning and the end of an edit session (regardless of whether the session is finished successfully or was canceled).
How to change the DIFF for a commit in Magit?
Cycle forward through the commit message ring, after saving the current message to the ring. With a numeric prefix ARG, go back ARG comments. By default the diff for the changes that are about to be committed are automatically shown when invoking the commit. To prevent that, remove magit-commit-diff from server-switch-hook .
Is there a limit to the size of a JGit commit?
Well, actually, there is a limit of ~5MB for JGit. Of course, I’ve got to ask why anyone would do that?! Especially since every subsequent clone would need to include that data. I’d say that if you’re going beyond a few KB then you really should be questioning your motives.
What should the first line of a git commit be?
Tim Pope argues for a particular Git commit message style in his blog post: http://www.tpope.net/node/106. First line is 50 characters or less. Then a blank line. Remaining text should be wrapped at 72 characters. His blog post gives the rationale for these recommendations (which I will call “50/72 formatting” for brevity):
Are there long summary lines in the git log?
Here’s a histogram of the lengths of the summary lines in the git log for the kernel: There is a smattering of commits that have summary lines that are longer (some much longer) than this plot can hold without making the interesting part look like one single line.
Are there any Git commits that follow the 50 / 72 rule?
Taking a look at the Linux Kernel Commits, the project that started git if you like, http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bca476139d2ded86be146dae09b06e22548b67f3, they don’t follow the 50/72 rule. The first line is 54 characters. I would say consistency matters.