Using double-quotes to define the gtg-min alias causes the tag to be permanently resolved when defining the alias, rather than when the alias is called.
$ alias gtg-min="git tag -s -a $(git-semver -target minor)"
$ alias gtg-min
alias gtg-min='git tag -s -a 0.2.0'
Then, calling the alias multiple times uses the same tag and fails:
$ gtg-min
fatal: tag '0.2.0' already exists
Using single-quotes fixes the issue:
$ alias gtg-min='git tag -s -a $(git-semver -target minor)'
$ alias gtg-min
alias gtg-min='git tag -s -a $(git-semver -target minor)'
Seems like pretty standard bash behavior but in case the version is interesting:
$ bash --version
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
Using double-quotes to define the
gtg-min
alias causes the tag to be permanently resolved when defining the alias, rather than when the alias is called.Then, calling the alias multiple times uses the same tag and fails:
Using single-quotes fixes the issue:
Seems like pretty standard bash behavior but in case the version is interesting: