To sync the tags from one repository to another, you can do the following:
- Clone the repository that you want the tags to be in, and change to that cloned repository.
git clone git@github.com:prb112/FHIR.git
cd FHIR
- Add a remote to the original repository.
git remote add fhiro git@github.com:IBM/FHIR.git
- Check that the remote is there (fhiro).
git remote -v
fhiro git@github.com:IBM/FHIR.git (fetch)
fhiro git@github.com:IBM/FHIR.git (push)
origin git@github.com:prb112/FHIR.git (fetch)
origin git@github.com:prb112/FHIR.git (push)
- Fetch the original tags.
git fetch fhiro --prune --tags
- Check the tags are shown.
git tag --list
- Remove the remote.
git remote remove fhiro
- Check that the remote is removed.
git remote -v
origin git@github.com:prb112/FHIR.git (fetch)
origin git@github.com:prb112/FHIR.git (push)
- Push the tags to the new destination.
git push --tags
Note I did disable the GitHub Actions prior, and re-enabled after.
Comments
2 responses to “Syncing Git Tags across Repositories”
thanks
You are most welcome