-
Notifications
You must be signed in to change notification settings - Fork 4
Rolling Back a Release
aayush-ap edited this page Jun 10, 2023
·
2 revisions
- Via the UI, delete the tag on Github
- Locally, checkout the previous tag that we are rolling back to (e.g.
git checkout v0.1.0
) - Delete your local main branch (
git branch -D main
) - Create a new local main branch at the previous tag commit (
git branch -b main
) - Run
git push main --force
Be aware that simply removing commits and tags from the git history won't change the fact that your previously-released code is already cached by the global Go ecosystem and may be used by developers. To inform the Go community and toolchain that a version of your module should not be used, you need to add a retract
directive in the go.mod
file for your module, and publish that in a new release. For example:
retract v1.2.3 // vulnerability discovered -- do not use this version#