This is an old revision of the document!
Overview
Miscellaneous notes on git commit, using the Linux kernel source as an example.
Examining what is about to be committed
git status
See which files are staged for committing:
$ git status On branch master Your branch is up to date with 'origin/master'. Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: MAINTAINERS modified: README Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: Makefile $
Template
This might be worth setting at the system level.
$ git config --global commit.template ~/.gitmessage.txt
Example ~/.gitmessage.txt:
Subject line (try to keep under 60 characters) Multi-line description of commit, feel free to be detailed. [Ticket: X]