https://nvie.com/posts/a-successful-git-branching-model/
git checkout develop
git checkout -b new-feature
# PR to merge new-feature
$ git checkout origin develop
$ git pull origin develop
$ git checkout -b release-1.2
# Create Pull Request and deploy release-1.2 to staging/testing environment for client testing
# Bug is foudn in release
$ git checkout origin release-1.2
$ git checkout -b release/JIRA-1234
# make fixes.
# Create Pull Request to merge back into release-1.2
# Merge release/JIRA-1234 back into develop branch as well
$ git checkout develop
$ git merge release/JIRA-1234 --no-ff
$ git checkout -b hotfix/JIRA-321 master
# make changes
# Open Pull Request into master and merge
# Merge hotfix/JIRA-321 into any current release branch as well as develop
$ git checkout release-1.7
$ git merge hotfix/JIRA-321 --no-ff
$ git checkout develop
$ git merge hotfix/JIRA-321 --no-ff
# Increment version, create git tag and create Release in Github
$ git checkout origin master
$ yarn release # uses https://www.npmjs.com/package/release-it
# Should be a Patch release 1.2.0 to 1.2.1
# After a release branch has been merged into master using a pull request
$ git checkout master
$ yarn release (uses https://www.npmjs.com/package/release-it)