Here is my setup
- Remote named
upstreampoints to the the branch where tag exists. - Remote named
originpoints to my fork.
I want to create a branch under origin that is even with the upstream tag. Make some changes to this newly created branch and raise a pull request to the upstream.
I am currently checked out on a branch under origin.
Performed the following operations based on this answer : https://stackoverflow.com/questions/15043450/git-branch-from-remote-tag
git fetch upstream <TAG_NAME>
1.
git checkout <TAG_NAME> -b <NEW_BRANCH>
fatal: '<TAG_NAME>' is not a commit and a branch '<NEW_BRANCH>' cannot be created from it
2.
git checkout tags/<TAG_NAME> -b <NEW_BRANCH>
fatal: 'tags/<TAG_NAME>' is not a commit and a branch '<NEW_BRANCH>' cannot be created from it
3.
git checkout upstream <TAG_NAME> -b <NEW_BRANCH>
fatal: Cannot update paths and switch to branch '<NEW_BRANCH>' at the same time.