Many people have different opinions on this subject.
The best according to me is to have a
master branch which contain
only deployable commits. Every commit on the
master branch could
potentially be deployed.
Every time you need to add a feature or fix a bug, create a branch,
work on it and when you are ready to merge it back to
master, do the
- Test your changes
masteron your feature branch
- Test your changes again
- Merge your branch into
masterwithout fast-forward (this will create a commit even if there had been no changes in the
So that would look something like this:
That would allow the master branch to have a clean history.