Say, I want to roll back to a commit by git reset --hard <commit's ID> to see how the project's structure looked like. But I don't want to lose the commits that go after that one commit that I want to roll back to. I just want to roll it back if needed and see how everything looked and then go back to my latest commit.
How do I achieve this?
(I tried searching this up but didn't find anything, all the resources were just about rolling back to the commit)
git log. The hash is the string of random characters that identifies that commit.git checkout <hash> to move to that commit