4 ms·
Sure, but how would you format your message so the lines aren't longer than 80 chars? I guess you can edit the command to read from STDIN, but that sounds much
by fphilipe 6y ago
Sure, but how would you format your message so the lines aren't longer than 80 chars? I guess you can edit the command to read from STDIN, but that sounds much more cumbersome than passing -e:
git commit -F- <<EOF
Fix issue
Hello world...
EOF
- masklinn 6y ago> Sure, but how would you format your message so the lines aren't longer than 80 chars? Put linebreaks and fill-paragraph for the later lines? You can put linebreaks in quoted shell strings, so once it's in an editor buffer there's no issue with that. > I guess you can edit the command to read from STDIN The use case here is "I've already started writing a commit message inline, I now realise I need more room, I don't want to bother copy/pasting stuff around". If I know from the start that I will need more than just a shortdesc, I'll obviously be crafting the message in my editor in the first place.
- u801e 6y agoMaybe something like fold -c -s -w 80 | git commit -F - <<EOF Fix issue Hello world... EOF