Skip to content

Git commit

Commit Git messages in terminal

git commit -m <your message> The "-m" stands for message

Commit Git messages using Nano editor

Once you have nano set up as default editor for Git, you can simply type git commit which will open up nano editor.

You type in your message with a subject line. Then hit ctrl + o and then Enter to save the commit message.

Finally, press ctrl + x to exit nano which will bring you back to terminal. The subject line of your commit message will be shown.

Git log

you can view the log on all your commit messages bit typing on of the three options: git log This shows all the commit messages in their entirety.

git shortlog This option shows the commit messages grouped by user and shows only the subject line.

git log --oneline This shows just the subject lines of all the commits.

To exit out of the log, simply type the letter q.