My question is this, I have the following commit:
4e3cb77 cambio local
7978945 despues de revertir el cambio de hensel
60e65f9 actualizacion
8397e64 Update prueba.txt
c9bd0fb primer cambio online
39c7cc0 Base de la prueba, archivo inicial local prueba
What is the process to follow to return to a particular commit (the one I want) both locally and on github.com staying in the same branch? So far I can only do it in the following way:
Once I see the log I do a git checkout
+ the committee I want to go to and this message comes out:
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b
HEAD is now at 39c7cc0 ... Test base, local initial file test
That's where I'm forced to create a new branch with:
git checkout -b rama
git push --set-upstream origin rama
However, in this way, despite creating an additional branch, the commits that were after returning to that commit are also lost, so if I have 10 commits and returned to commit 7, commits 8/9/10 do not see the commit. log of the new branch and I do not want that. I do not know if I was clear enough any doubt please indicate me.