Release Tag
When to use tag: every time you push to production, tag the release. Release tag points to a specific commit in history.
1 | # fetch all remote tags |
这个git command很有用
1 | ## can see commit detail, tag annotation, and so on. |
References: what is tag annotated and non-annotated tag move a tag on a branch to different commit
Release Branch
Generally you only need tags for releases. But when you need to make changes to production release without affecting master, you need release branch. For example, make hotfix. Release branch can be updated with new commits.
Use cases for release branches:
- Manual QA.
- Long running releases.
- On demand hot fixes.
Workflow is like
1 | # we have some hot fixes on release branch, then create a release tag on it for production |
[x] This is why we have double-commit back to master branch. 我们把release tag放在master branch中了。
You can also create release branch on the fly from release tags, the workflow:
1 | # on master branch |