-
Notifications
You must be signed in to change notification settings - Fork 58
Git usage
Gaël Poupard edited this page Jan 19, 2021
·
9 revisions
As mentionned in our DoD for release, you need to use conventional commits messages to ease changelog generation.
The minimum required is the following:
<type>[optional scope]: <description>with <type> being one of those: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test:.
optional scope is mandatory when you're working on Boosted components.
I tend to follow git-flow branch naming convention—but not git-flow itself since our releases and features require some more steps.
Bootstrap on its side recommends the following pattern:
<target branch>-<author nickname>-[scope]For example main-ffoodd-rtl would be a branch working on RTL which targets main.
Trying to keep things readable, here're a few advices:
- don't make merge commits: always try to rebase your branch instead. If there's no conflict, GitHub will offer a way in its "Merge" button options: I recommend using
Rebase and merge. You could trySquash and mergebut ensure to name your PR accurately. - if you have conflicts, please learn and use
git rebase(maybe using its interactive mode). It's a good thing to master since it'll also allow you to revamp your history on your branch before merging, helping to keep your history as clear as possible. - ensure to only have atomic commits where possible: each commit should work standalone, meaning e.g. you shouldn't commit HTML, CSS, JS nor docs separately for a feature.
- a good history allows to easily revert any feature, fix, or whatever at once.