When working on our git repositories, this is the general workflow / branching strategy we follow:
-
Development happens on the master branch (this way new developers can start writing code as soon as they've clone the repository)
-
Long-running development on a features/feature_name branch and then merged into master
-
Work to be done by vendors happen on a vendors/vendor_name branch and merged into master after being checked over (use pull requests).
-
Merge master into deploy/production or deploy/qa to trigger the respective deployment in the CI/CD tool.
-
Hotfixes on the deploy/production branch or deploy/qa branch if separate testing is required first
-
deploy/production is precious/sacred and should be deployable at all times