Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
195 views
in Technique[技术] by (71.8m points)

git - Change connected commit on release github

How you I change the connected commit on a github release? Release

I want to change it to an earlier commit, because I created the release afterwards (after some commits to release 0.9)

question from:https://stackoverflow.com/questions/24849362/change-connected-commit-on-release-github

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

When you consider the GitHub API for creating a release, you see a release needs:

  • a tag
  • a commit referenced by that tag

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...