How do you "pull request" tags from a fork back to its parent

Hi, we have released code in a fork and after release we do a pull request from the fork back up to its parent (master to master). But the tags don't get pulled. Is there any simple way to pull the tags?

I guess I could clone the fork (locally), add the parent as a remote and "git push parent --tags". Is there any danger that I will push other branches or commits if I do this though?

2 answers

1 accepted

0 votes
Answer accepted

Hi David,

Unfortunately the main mechanism of moving code between forks in Stash (and all Git hosting solutions that I know of) is via branches. As you've suggested your best bet is to fetch locally and then push up to 'parent'. If you're worried about using '--tags' (which will push _all_ local tags, but not branches) you can push each tag manually:

git push parent tag-1 tag-2

Generally most teams I know of (including Stash) will always 'release' from the main/parent repository as that is usually the source of truth. Just out of curiosity, is there any reason you don't do that instead?


Hi Charles,

thanks for the response.

We create our release branches in the project doing the release and it goes through the test cycle there. Only once released to prod do we merge to master and pull to the parent. I guess that I can change the process to not tag in the project fork, but merge, then pull to parent, then tag in the parent. Fork synching should then propagate to the other projects.

Our parent and all forks ONLY have master in common. develop, release, feature and bugfix branches are all project specific.

Obviously each project has to merge in any released code from any other project before any subsequent releases so as to prevent regression.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

220 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you