Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub tags shown on wrong commit

Tags:

git

github

So I have a project with two branches: master and stable. master is where feature and bug branches are split from and merged into. The master branch is merged into stable for every release. I'm trying to follow this workflow. So I just released a new version, merged master into stable and tagged the merge commit. Locally, git log looks like this:

local git log

So the tag v1.1.0 should appear on commit 31b58ba right? On GitHub, the release was picked up and looks like this:

GitHub release

But when I click the commit link under the tag name on the left, I see this:

GitHub commit view

No tag to be found. Now here's the interesting part (for me at least), when I visit a previous release, tagged v1.0.0, I see this:

GitHub commit view

Both tags are seen on this commit. I am pretty new to Git tags and GitHub releases so there is a very big chance that I'm misunderstanding something here. One thing I noticed is that the v1.0.0 tag is on the master branch (default branch) while the v1.1.0 tag is on the stable branch. I'm not sure if that could have anything to do with it. Please enlighten me.

like image 917
jolaleye Avatar asked Jul 13 '26 00:07

jolaleye


1 Answers

You may not have pushed the update to the tag reference. So github has the merge commit, but did not update the tag location.

Use the same convention as branches:

git push origin v1.0.0

Tags don't refer to branches, only commit references.

like image 144
Russell Avatar answered Jul 14 '26 13:07

Russell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!