Git Best Practics - PLLUG/CPPQT-2019-1-FileServer GitHub Wiki
Git: Using Git
Git.1: Create a separate feature/fix branch for each task.
Make only necessary changes to implement some feature or make a bugfix, and keep them in a separate branch. That will allow to simplify code review and keep track of all changes.
Git.2: Name of the feature branch should be informative and contain task ID.
Create a name that allows everyone to easily recognize what kind of changes it contains. Task ID will allow keeping connection to a certain ticket. Also, feature- and fix- prefixes for branches that contain feature implementation or bugfix could be a good practice.
Examples (Good):
feature-21-CommandLinedParser
Examples (Bad):
version-1
Git.3: Commit comment should be informative and clearly describe what was changed.
You should be able to look at commit description and understand changes in general without looking into the diff.
Examples (Good):
.gitignore updated to exclude files generated for C++ project
Examples (Bad):
small fixes
For more bad examples look here: http://whatthecommit.com/ (F5 for new one)