I have a git repo head that fires a hook after an update as follows:
GIT_WORK_TREE=/path/to/code git checkout -f
This works well when clicking code, for example on a web server. I can work with the code, and when I finish, updating the web server is simple. git push live master .
However, I do not know how to roll back, for example, a specific tag. This can usually be done using git checkout TAG , but when I try to check a tag (e.g. GIT_WORK_TREE=/path/to/code git checkout -f TAG ), git answers:
error: pathspec 'TAG' did not match any file(s) known to git
Any ideas on how to validate a tag on a remote working tree?
source share