How to Reset to Previous Code State in Git / GitHub ⛰

Find the Commit’s Hash

Git ambiguous argument error message.

Find the Commit’s Hash with GitHub Desktop

GitHub desktop “History” tab.
GitHub desktop commit short hash.

Find the Commit’s Hash with the Command Line

Git log

Reset Codebase and Push

Git reset — -hard command.

Extra Info: About the --force Flag

Git “updates rejected” error message.
Burned forest.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store