use git check to change to different commits, checkout is a great command in git to change to different commits in your depository
git checkout commit_id

once you have send the command, you will get a notice:
you are in 'detached HEAD' state.
this means you are not working on the new commit that you changed to and not the HEEAD

so how do you change back to the HEAD?