'Upstream git tag is not showing in forked repository
I have the 1.11.57 tag in the upstream which i pushed with master branch code. I am using bitbucket and git bash
I forked above repository and locally use the fork repository as my local master branch. But in my forked repository the 1.11.57 tag is not showing.
I check the repository sync also having no problem. What is the cause of this and how to get the upstream tag to my fork and then to my local too.
Solution 1:[1]
For the reason why upstream git tag not showing in forked repo
For the missing tag in forked repo, it’s mainly caused the fork operation did firstly, then the missing tag (as v1.11.57 for your situation) was pushed to upstream repo after forking.
The way to sync git tag from upstream repo to forked repo
You can use below commands to sync missing tag from upstream to the forked repo:
# In local forked repo
git remote add upstream <URL for upstream repo> -f
git push origin --tags
Then you will find the missing tags show in the forked repo.
Solution 2:[2]
Just to add to what was written above, I also had to run:
git fetch upstream --tags
To get it to actually pull the tags from upstream.
So if like me, the tag were not showing up, add this after the previously mentioned git fetch upstream
Solution 3:[3]
I did it by following below commands.
In my local,
git remote add upstream https://upstreamurl.git
git fetch upstream
Now tags are in my local, I push it to my master branch
git push -f origin master
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Brian Burns |
| Solution 2 | Paul Snow |
| Solution 3 | Brian Burns |


