DEV Community

David Carr
David Carr

Posted on • Originally published at dcblog.dev on

GitHub patch release previous version

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.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more