- Title must be up to 72 characters long
- It facilitates to see the log, i.e.,
git log --oneline
- There are tools that truncate messages
- If you can, keep it under 50 characters
- It facilitates to see the log, i.e.,
- Title must start with a uppercase letter
- Title must start with a verb in third person singular
- Title must not use passive voice
- Title must not end with a period (full stop)
- Title must be separated from the message body by an empty line
- Body is optional
-
- Usually the title is enough to express the change
- Body must explain what and why, but not how
- It must focus in the perceived contribution
Add option to export to PDF
Refactor class Foo
Remove foo.json and bar.xml
Closes #123
Document component Acme
Approve merge #456
Approve merge #456 from some-user/some-branch
Update version to 1.2.1
Fix #123 about watchamacallit
Undo "Add option to export to PDF"
Revert commit c83d7a9ac83d7a9ac83d7a9ac83d7a9ac83d7a9a
Release version 1.3.0
What's new:
- New watchamacallit, see #125
- Improve performance of thingamajig
- Fix #123 about thingamabob
- Fix #124 about doodad
-
Always group a set of changes or files by a single task
- Atomic commits are easier to undo
- It facilitates to track changes from the commit messages
-
Separate fixes from changes
- It facilitates to apply a fix to other branches
- It makes commits easier to undo
-
Never commit if it does not compile
- Verify before committing
-
Integrate every day
- It avoids to accumulate work to do
- Use
fetch
to get updates - Always
merge
with stable branches
-
Set aside some time to integrate
- It helps to comply with Rule 4
- It makes it easier to organize your work
-
Do not integrate when you are in the middle of a task
- It facilitates to merge branches
-
Always update before sending your work
- Use
fetch
andmerge
(orpull
) beforepush
ing
- Use
-
Separate branches for changes and fixes
- It help with rules 1 and 2
-
Organize yourself to do one thing at a time
- Rules 1, 2, and 5 require organization. Try to plan your work beforehand.
-
Submit incomplete work to personal remote branches
- At the end of the day, whether you could not to finish a certain task, submit your work to a remote branch. Thus, you lower the risk to lose your work if your computer gets broken, make your work accessible to other team members, and do not interfere with other people's work.
-
Submit incomplete work to the stash when merging
- Use
stash
appropriately to not lose your work or to facilitate its integration to the merged content.
- Use
-
Use tools to detect problems before commiting
- Use pre-commit or pre-push hooks.
- Use linters to detect problems or potencial failures.
- Verify if your code compiles correctly.
- Verify if your code pass the automated tests.