It makes much easier to switch between different git projects if we try to follow similar rules for commits, branches and other git related stuff.
So, based on best practices used in different mobile projects we've come to some basic rules:
We are trying to make it easy to read commits history. To make commits look similar in different project / from different people some best practices can be applied:
- adding prefix to commit:
[DEV]
for developer related tasks (setting up CI, making configuration changes in the project etc)[REF]
for refactoring related tasks[ADD]
for adding new classes (which serve special needs, e.g.MessageHelper
,Logger
etc)[DEL]
for deleting unused classes/files/assets ([DEV]
can be used as well)[UI]
for UI related code[CRASH]
for crash fix[FIX]
|[BUG]
for bug fix
- commit message should explain what is done/fixed/implemented and why (or what it is related to).
Examples:
**Preferred: **
[DEV] adding HockeyApp integration to be able to upload builds via command line on Jenkins
[FIX] fixing logic of checking if Date is today to highlight todays data correctly
[UI] adding new storyboard/layout for Login view
Not preferred:
HockeyApp sdk
isToday fix
new layout
Branches can be named based on what will be done in them:
feature/...
for feature related branchesfix/...
for bug fix related branchescrash/...
for crash fix related branchesdev/...
for dev tasks or refactoring- more to be added on demand
TBD