To jump back to a previous commit, first find the commit's hash using git log.
To temporarily jump back to that commit, detach your head with:
git checkout 789abcd
This places you at commit 789abcd. You can now make new commits on top of this old commit without affecting the branch your head is...