Is there a way to 'forward-track' in Git?

I’ve just learned that one can backtrack to a version of one’s choice using the ‘git reset commit_SHA’ method ( They also mentioned that the commits that came after the one you reset to are gone and the HEAD commit is reassigned to a previously made commit of your choice.

Say I realized that I made a mistake backtracking to a previous commit. I want to revert changes to a commit I had made before backtracking to a more previous version. Would I be able to revert changes to a commit in the ‘future’ (or ‘forward-track’, so to speak), or are all the versions that come after the new HEAD commit already deleted and I have to rewrite the code?

I’ve only ever tried it once or twice so I may be incorrect. So far as I’m aware those commits should remain in your local repo for quite a while (something like git reflog could help you find the correct sha to return to, it should around there somewhere). Best option for nosing around in old commits is to to checkout and start a new branch. You can always prune the excess in the future when you’re certain you don’t need it.

Using the --hard flag on git reset would mark the upstream commits for deletion though (but even that might not be immediate, see