-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
What is the problem or limitation you are having?
For the longest time, it was driving me nuts that I couldn't view or checkout any tags on my local repo clones. If I wanted to browse or test a BeeWare library at a specific version, I had to go to GitHub, look up that release, and copy its commit hash in order to check that out.
I finally figured it out back in the summer: beeware/toga#3683 (comment)
When you fork a repo on GitHub, your fork copies all the commit history, but not the tags. As far as I know, there's no way to tell it to do so. What I had to do was:
- Add the upstream repo (the "real" BeeWare one, from which I forked mine) as a remote on my local repo, e.g.:
("upstream" is conventional, but you can name it whatever you like.)
git remote add upstream https://github.com/beeware/toga.git - Fetch the tags from the original, rather than my fork:
(Or whatever you named it)
git fetch --tags upstream - For good measure, if you'd like, you can also push them to your own fork:
They're already on your local repo from (2), but this can be handy if, say, you want to make a fresh clone later; now you'll be able to pull the tags from your own fork without even having to add the upstream remote.
git push --tags
Describe the solution you'd like
Considering how long this baffled me, I'd love it if this were in the contribution guide.
I'm not positive where to put it, since it's not exactly something one needs in order to get started, especially not at first. But it would be great if it's discoverable.
Describe alternatives you've considered
It's not a huge deal to not have this... just potentially inconvenient and confusing.
Additional context
No response