I want to create a tag that leaves out certain commits. So when creating the tag, I choose which commits to add (or which to omit). This would enable me to deploy a hot fix and leave out older (and newer) commits.
The same could be achieved by using branches, but I don’t want to make one branch per environment (dev, test, staging, prod). So if I could create all tags in 1 branch, I could deploy only prod tags to prod and HEAD to the rest (dev, test, staging).
Maybe something with git-notes?
(Cherry picking to a tag?)
In Git, tags are used to identify a single commit, and branches are used to identify a sequence of commits. You can create a new branch by picking the desired commits from the different branches (or environments as you call them). Then deploy the new branch to prod and HEAD to the rest (dev, test, staging). However, you may want to consider using a different workflow that is more accommadating.
See http://nvie.com/posts/a-successful-git-branching-model/