It'd help if you could make the scenario a bit clearer.
In general, if we want to roll back to older commits, we can use git revert. We can also delete commits with git reset --hard HEAD~x where 'x' is the number of last commits that you'd like to delete. But revert is always a better option as that way our code always stays in git.
hi, i wanted to know how to convert my code to another code that i commited. is there is something similar to branch's checkout for that?
It'd help if you could make the scenario a bit clearer.
In general, if we want to roll back to older commits, we can use git revert. We can also delete commits with
git reset --hard HEAD~x
where 'x' is the number of last commits that you'd like to delete. But revert is always a better option as that way our code always stays in git.thank you very much. and i'm sorry that my english isn't good
glad i could help