How to commit a change with both “message” and “description” from the command line? [duplicate]

I’m new to both git and GitHub. I managed to set up everything locally on my Mac, so that now I can push commits to GitHub via git (on the command line, not the Mac app).

When I push commits directly from the GitHub web interface (e.g. quickly fixing a typo), I have the chance to “comment” the commit, and GitHub gives me a commit title and a commit description. I find this very useful.

Still, when I git push from the local machine, git opens my default editor: so I write the commit comment, and then GitHub automatically divides it into title and “body”. Is there a way to pretty comment commits from terminal too?

4 s
4

Leave a Comment