Skip to content

Instantly share code, notes, and snippets.

@MS-Jahan
Created January 8, 2021 06:04
Show Gist options
  • Select an option

  • Save MS-Jahan/081efeb6ebf71bc215e0600de966629d to your computer and use it in GitHub Desktop.

Select an option

Save MS-Jahan/081efeb6ebf71bc215e0600de966629d to your computer and use it in GitHub Desktop.
Change (revert) back to previous commit without commit history
git reset --hard <commit_hash>
git push origin main --force # --force is important here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment