Say we have three branches:
- master : the one whole team collaborate on
- feature-a : merging candidate for this feature
- feature-a-dev : daily development for this feature; might contain a lot errors in the commits as the developers learn more on this area
feature-a is rebased onto master to pick up all the changes done by other members in the team.
git checkout feature-a git rebase master # hopefully, there's only small conflicts, if any
Create one commit on
feature-ato capture the changes in
whenever it reaches one milestone.
git checkout feature-a-dev git checkout -b feature-a-dev-tmp git reset feature-a / git reset --soft feature-a git checkout feature-a git add / git add --patch / editor-supported-diff-adding git commit <milestone_msg> git checkout feature-a-dev git reset --hard feature-a-dev-tmp git branch -D feature-a-dev-tmp
git checkout master git merge feature-a / git merge --no-ff feature-a
Following the above practice, hopefully, you could make sure master always has informative history.