I have an open source project on GitHub: https://github.com/xrgarcia/alphavantage_api_client
When a visitor hits my landing page i want the REAME to point to a specific tag. At the moment it's 1.0.2.
How to set the default branch or tag for the landing page of my project?
I have tried looking at other GitHub projects (i.e. aws-sam) and i can see this is possible, but i haven't found the settings for it.
CodePudding user response:
I would prefer a tag be something i could set as what visitors see
Since it is not practical to switch default branches (as it does not reflect a tag), an alternative would be to:
keep you main branch
update your
main/README
with an INSTALLATION section stating the exact tag you want the user to clone your repository with:git clone --depth 1 --branch <tag_name> <repo_url>
--depth 1
is optional (shallow clone), but if you only need the state at that one revision, that would be enough.
However, nothing prevent you to make a branch named after a tag, and use that as your default branch.
That could also be a viable option.