Calling scm:checkout for a tag often results in a merge failure.
This is caused by the fact that we do a git-pull prior to the checkout, but in fact for tags, we only shall do a git-fetch.
This is due to the fact that the tag may be on a different branch, so merging this branch into the current branch in the local repository would destroy the local repository.
Instead we should first do a git-fetch [fetchUrl] followed by a git-checkout tagname.
This will create a 'detached HEAD' in the local repo which is exactly the way it should be in git.