On Github you way from time to time need to patch release the previous version of a published release.
This took me longer than I care to admit to understand the steps involved. Hence I'm documenting them in this post.
Step 1: Check out the branch corresponding to the previous version of your code.
git checkout 7.3.0
Step 2: Fix the bug in the code.
Let's say it's a breaking change that's been fixed in the code.
Step 3: Commit the changes with a version number that indicates the patch release.
Commit the fix
git commit -m "Fix bug in 7.3.0"
Next, create a new tag
git tag 7.4.0
Step 4: Push the changes to the remote repository.
git push origin 7.4.0
Step 5: Create a new release for the patch version on GitHub.
Navigate to the main page of the repository on GitHub.com, click on the Releases tab, and then click on the "Draft a new release" button.
Step 6: Fill in the details for the release in the form, select the tag created from Step 3, and fill in the release notes.
Once you have filled in the details, click on the "Publish release" button to publish the release.
Top comments (0)