This is not a direct answer to the question, but this page returns when looking for ways to return the branch code to the tag release.
Another way is to create the difference between the current state of the branch and the tag that you want to return to, and then apply it to the branch. This keeps the version history correct and shows what changes are happening and then returns again.
Assuming your branch is called master , and the tag you want to return to is called 1.1.1
git checkout 1.1.1 git diff master > ~/diff.patch git checkout master cat ~/diff.patch | git apply git commit -am 'Rolled back to version 1.1.1' git push origin master
John Nov 24 '15 at 9:38 2015-11-24 09:38
source share