In case of shallow fetch, there is no local information about all
existing tags. Therefore the test if the tag already exists, should use
git ls-remote in this case. It enables to fail earlier before the try to
push existing tag.
Unfortunately git-ls-remote returns with 0 even if the refs is not
found. So it is necessary to check if its output is not empty.