Open source contribution

Stage 2 · Lesson 4 of 7

Commit messages and Conventional Commits

Git and GitHub for contributors

A reads your commits before your code. A starts with a short of around 50 characters, written as a command, such as "Fix crash when config file is empty". Then leave a blank line and write a body.

The body explains why the change was needed and anything that is not obvious. Keep one logical change per commit. Many projects require , a fixed format for the subject.

It starts with a type such as feat:, fix:, docs:, test: or refactor:. An optional scope in brackets names the area, as in feat(parser):. A ! or a BREAKING CHANGE footer marks an incompatible change, one that breaks existing users.

Tools read these prefixes to write changelogs and pick version numbers. Check the and git log to see which style the project already uses.

A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock

Resources for this stage

Start with

  • BookFree
    Pro Git

    Scott Chacon and Ben Straub

    Chapters 3, 5 and 6: branching, contributing to a project, and GitHub forks

Practise

  • The remote levels drill fetch, rebase and pushing while you watch the commit graph

Keep handy

Also worth your time

Mark this stage as not done?