Release Deployment
Release Deployment
Practise a scheduled release: stabilise a release branch, tag the approved revision and prepare a patch without disrupting ongoing work.
Distinguish an integration branch from a release-stabilisation branch.
Tag a specific commit and verify the files associated with that release.
Apply a hotfix and compare two release versions.
Release-driven development
Unlike a continuously deployed project, a release-driven project may batch approved changes into a scheduled version. This chapter uses develop for ongoing integration and main for published releases, matching the original release-branch diagrams. Feature branches start from develop; release branches are stabilised and then merged into both permanent branches.

Two permanent branches separate development and published releases.
Branch roles
| Branch | Purpose | Retained? |
|---|---|---|
main | Published release history | Yes |
develop | Integrated work for the next version | Yes |
feature/* | New functionality | Until integrated |
release/* | Stabilisation and release notes | Until published |
hotfix/* | Urgent production repair | Until integrated |
Practical: prepare a release
-
Initialise a local repository, configure a lab-only author and make the initial release.
mkdir -p ~/git-release-lab && cd ~/git-release-lab git init -b main git config user.name "Git Student" git config user.email "student@example.invalid" printf 'Sensor service v1.0\n' > app.txt git add app.txt git commit -m "feat: baseline service" git tag v1.0.0 -
Create the integration branch from the published baseline.
git switch -c develop git branch -v -
Record the distinction between
main,developand the tag.git log --all --graph --oneline --decorate
Feature development

Feature branches feed into develop before entering a release.
-
Start a feature branch from
developand create a new file.git switch develop git switch -c feature/adc printf 'ADC module enabled\n' > adc.txt git add adc.txt git commit -m "feat: document ADC module" -
Review the feature and integrate it into
develop.git diff develop...feature/adc git switch develop git merge --no-ff feature/adc -m "merge: ADC feature" -
Confirm that
mainstill represents the older published version.git diff main..develop --stat git show main:app.txt
Stabilise and publish a release

Release branches hold the selected set of changes during stabilisation.
-
Branch from
developand prepare version-specific release notes.git switch develop git switch -c release/v1.1.0 printf 'v1.1.0\n- ADC documentation\n' > CHANGELOG.md git add CHANGELOG.md git commit -m "docs: prepare v1.1.0 release notes" -
Verify the proposed release files and compare its commits with
main.git log --oneline main..release/v1.1.0 git diff --stat main..release/v1.1.0 git status --short -
Merge the approved release into
main, and tag the published commit.git switch main git merge --no-ff release/v1.1.0 -m "merge: release v1.1.0" git tag v1.1.0 git show --stat v1.1.0 -
Merge release-specific changes back into
develop.git switch develop git merge --no-ff release/v1.1.0 -m "merge: sync release v1.1.0" git branch -d release/v1.1.0 -
Inspect both branches and the release tags.
git log --all --oneline --graph --decorate git tag --list
Patch an urgent issue
-
Return to the published
mainand create a focused hotfix branch.git switch main git switch -c hotfix/v1.1.1 printf 'Sensor service v1.1 (verified)\n' > app.txt git add app.txt git commit -m "fix: clarify sensor service label" -
Merge the fix into
mainand tag the new published version.git switch main git merge --no-ff hotfix/v1.1.1 -m "merge: hotfix v1.1.1" git tag v1.1.1 -
Integrate the same repair into the development branch.
git switch develop git merge --no-ff hotfix/v1.1.1 -m "merge: sync hotfix v1.1.1" git branch -d hotfix/v1.1.1 -
Compare the released versions.
git diff v1.1.0..v1.1.1 -- app.txt git log --oneline --decorate --all --graph
Supporting older releases
A patch for an older supported version must be based on that older version, not blindly on today’s main. The original release model uses maintenance branches such as support/v1.x; such branches are appropriate when several versions must be supported simultaneously.
-
Create a maintenance branch at the original
v1.0.0tag.git switch -c support/v1.0 v1.0.0 git show --stat HEAD -
Make a documentation-only maintenance change and identify its scope.
printf 'v1.0 maintenance notice\n' > SUPPORT.md git add SUPPORT.md git commit -m "docs: add v1.0 support notice" git log --oneline -2 -
Return to the development branch without merging the maintenance line; discuss whether its change should be cherry-picked.
git switch develop git log --all --graph --oneline --decorate
Release checklist

A production release can also require an externally approved artifact or bundle.
When might another model be better?
Use a release-driven workflow when approvals or scheduled publication are required. If every passing commit can be released automatically and safely, the extra permanent develop branch and release branches may add unnecessary integration work. If multiple incompatible versions require long-term support, use explicit maintenance policies rather than assuming all fixes will merge automatically.