Question

In the github for mac application there is a summary and description field to you can fill out with each commit. i know that the summary field is the same as using the -m option in command line but what about the description field, how do i do that part over command line?

Était-ce utile?

La solution

The summary + description format in Git commits is a matter of (good) convention:

  • The summary should be 70 characters or less
  • An optional longer description can follow, after an empty line after the summary

The command line equivalent of entering "brief summary" as summary and "doing this and that" as description:

git commit -m 'brief summary

doing this and that'

Or on a single line in bash:

git commit -m 'brief summary'$'\n\n''doing this and that' 
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top