- Explorer -> Switch/Checkout
- Select branch, master
- OK
TortoiseGit: How do I temporarily switch to an earlier version
-
03-07-2023 - |
Pergunta
In Git I have made a bunch of changes to my master branch, and I also have created a tag called 'BeforeDynamicCasts'. I wish to temporarily switch to 'BeforeDynamicCasts', and then revert back to my master branch.. How can I do this?
I can do switch/checkout to the tag, but not sure how to get back to the master branch afterwards. Is this the correct way to do it? Last time I did this I was not able to get back to my original master branch.
Solução
Outras dicas
To be able to go back to the old HEAD after testing the older version I do this (because the old master branch doens't show up anymore in the log after going back):
- Explorer -> Tortoise git ->show log: write down first 8 characters of SHA of last commit (HHEAD)
- Explorer -> Tortoise git Switch/Checkout: select older version, click OK
- play around with older version
- Explorer -> Tortoise git Switch/Checkout: select commit, enter SHA of HEAD, uncheck 'Create new brach", click OK
This may not be elegant at all, but it works for me
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow