I have my local machine which has some recent developments I pushed to the remote, however I forgot something was messed up when I’d pushed last time to my remote machine.
commits on github remote:
commit C – contains new files I need, but something is messed up that I need from commit B
commit B – the last commit prior to C
How can I go back to commit B on my local machine, and then apply the changes from commit C?
I have read a lot, but of all things Git confuses me the most so please help without putting me down. I don’t want to make a mistake and have to start over because I didn’t understand what I read.
>Solution :
git checkout branch-name
for example if you want to go the version B and its name is temp
you do git checkout temp to obtain the version B git