开发者

How do I make Github show the latest tag as the default view?

I learnt about tags after I'd started committing to a github project. What I used to do was:

git push origin master

Now, I'll do:

git tag -a v0.0.5 -m "version 0.0.5"
git push origin v0.0.5

This works in that it is uploaded fine, but the default view of the repo on the Github webpage is still of the untagged master. Is there a way to get it to show the latest tag by default, or do I also have to just p开发者_如何学编程ush the master again in the untagged way?

Any help would be much appreciated.


I don't think github allows this kind of settings, but I have accomplished to always load the last tag in my master branch by following some useful guidelines described by Vincent Driessen in his article A successful Git branching model.

If you look the main branches section you will see how the master is always used for successful releases, and as a result, you will always end up with the last tag being shown in your github main page.

NOTE: Also, you can create a "releases" branch as well, set it up as the default branch on github, and use it to have your releases/tags instead of the master.


You create a ref called released or similar and point it to the latest tag every time you make a new one. Then force push that ref and set it as the default branch.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜