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 origin is the remote and deploy is the tag I want to check out, but I get
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'origin/deploy' which can not be resolved as commit?
UPDATE: I've just discovered that
git fetch --all -t
was not working properly for me. While it downloads all branches, it does not download all tags, so when I checked out deploy it was and old tag. Now I execute
git fetch --all && git fetch -t
This way when I create a new branch based on a tag
git checkout -b test deploy
the new branch is up to date with the last deploy.