git commit

The command that records the staging area as a new commit whose parent is the current commit, then moves the current branch to it.

In more detail

git commit -m 'message' takes the message inline; with no message flag Git opens your editor. -a first stages every modification to tracked files, but never adds untracked ones. -F reads the message from a file, or from standard input when the file name is a dash.

Examples

git commit -a -m 'Retry three times before giving up'
git commit -F message.txt

Related terms

Taught in

References