AFAIK, git push --tag pushes every tags under refs/tags to remote. I want to know if there is a way in git to only push some tags that matches a wildcard or regexp?
For example, my repo has tag v1.0, v1.1, v2.0 and v2.1. I want to only push v2.*. I tried
git push <repo> refs/tags/v2.*
and got error
fatal: remote part of refspec is not a valid name in refs/tags/v2.*
Of course, I can always do
cd .git && ls refs/tags/v2.* | xargs git push <repo>
But this does not smell gity.
.gitmay not be directory, it may not be there at all. Submodules have there file pointing to root repository. Or you can haveGIT_DIRset to somewhere else.