Question

If there is tag 1.1 for master branch in github, I want to create a pull request with some commits that only apply to that very tag. Is this possible?

Was it helpful?

Solution

A tag is a named reference to a commit that cannot be moved (without deleting and re-tagging). A branch is a reference to a commit that can be moved forward to track development. So while you can make a local branch off a tagged commit, you can't push a commit to a tag--you have to make a PR to merge into another branch.

You could create a branch in your remote named something like 1.1-backfix off the 1.1 tag, and create a PR to merge into 1.1-backfix. You could delete and re-tag the new commit as 1.1 (although I wouldn't recommend it). You should probably tag the merge commit as 1.1.1 or some distinct version number when it's released so it can be distinguished from 1.1

Licensed under: CC-BY-SA with attribution
scroll top