I have a bare_repo that is cloned to three environments. When I work on dev and complete my work I want to be able to tag it and then ssh into test and pull a specific tag up.
Example: Lets say on DEV I make three commits: 1, 2, 3. And lets say I tag it at 2 git tag -a 2. Then I do a git add -u; git commit -m “woo!”; git push –tags. Then I ssh into test and I want to do a git pull but I don’t want to pull commit 3. I want to pull only everything up to the tag 2. How do I do this?
EDIT: An alternative to this would be being able to pull specific commits up from the bare repo to the other clones.
Do a
git fetchto get all changes from the repo followed by a
git reset --hard 2to get the repository state at this tag.