User Tools

Site Tools


This is an old revision of the document!


Miscellaneous notes on git commit, using the Linux kernel source as an example.

Checking 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


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]
git_commit.1550650931.txt.gz · Last modified: 2019/02/20 08:22 by rpjday