I\'m trying to create a branch from a remote tag, but it seems there\'s no way to do it. When I try
git checkout -b test origin/deploy
where or
to list all the tags
git fetch
git tags -l
to create a local branch that points to the tag
git checkout tags/<tag_name> -b <branch_name>
git checkout -b <branch_name> tags/<tag_name>
I'm not sure you can do this directly. You're probably stuck with doing a fetch and then a checkout:
git fetch origin
git checkout -b test tag-name
By the way, I wouldn't recommend using a tag name like "deploy".
I'm not a git guru, but I had used something like this before and it seemed to have worked fine:
git pull (or fetch, just need to make sure you are updated)
git checkout -b test remotes/origin/deploy
You need to run
git pull
git checkout -b <new-branch-name> remotes/origin/<source-branch-name>