I currently have a deployment process where production release tags are in the form v1.0.1 and stage/ release candidates follow the form v1.0.1-rc.1. I see that I can use the below to pull in only release candidates:
git ls-remote --tags --refs --sort tag origin "refs/tags/v*.*.*-rc.*"
ba2ed... refs/tags/v1.0.1-rc.1
f37ac... refs/tags/v1.0.1-rc.2
But how can I do the opposite where I only see tags like v1.0.1, v1.0.2, etc where I might exclude tags containing the -rc. pattern?