How you I change the connected commit on a github release?
I want to change it to an earlier commit, because I created the release afterwards (after some commits to release 0.9)
Editing a releaseOn GitHub.com, navigate to the main page of the repository. To the right of the list of files, click Releases. On the right side of the page, next to the release you want to edit, click . Edit the details for the release in the form, then click Update release.
Changing the latest Git commit message If the message to be changed is for the latest commit to the repository, then the following commands are to be executed: git commit --amend -m "New message" git push --force repository-name branch-name.
Click on the “Browse files” button (https://github.com/xxx/yyy/tree/zzz) Create a branch on this commit by hitting the “Tree” drop down, try to find an unexisting branch name, and create it. Go on the release creation form, and instead of looking into the “recent commits”, find your freshly created branch.
When you consider the GitHub API for creating a release, you see a release needs:
So you need to move your tag (locally first, then push it to your GitHub repo)
git tag -f -a <tagname> [<commit> | <object>] git push -f <reponame> refs/tags/<tagname>
Then see if that is enough for the release to be updated.
(See "How do you push a tag to a remote repository using Git?")
If not, you might have to delete that release, and recreate it on the same tag (which will refer to the new commit)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With