Search code examples
gitversion-controlbitbucket

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

enter image description here

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.

enter image description here

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

  • Make sure you have push all tags from your first cloned repo. With SourceTree: check the "Push all tags" box on the "Push" dialog box.

    Only then would forking reflect the new tags.

    Since you have already forked, add the original repo as a remote, and fetch the tags:

    cd /path/to/fork/clone
    git remote add upstream url/original/repo
    git fetch --tags upstream
    # Push the tags from my local to my master branch
    git push -f --tags origin master
    

    (You can also add the new remote with SourceTree)
    (And you have the "Fetch and store all tags locally" option with SourceTree)