Skip to content

Revert to Previous Github Commit

Lyndon Warren edited this page Oct 24, 2023 · 1 revision

Revert to Previous Github Commit

If you need to revert your local repo to an older commit:

Make sure you have Git installed, you need it for this.

  1. navigate to folder of project
  2. right-click and click "git bash here" to open the directory in a command prompt
  3. Use "git log" to see previous commits, then “q” to quit
  4. Use “git reset <commit ID>” to reset to previous commit
  5. Use “git push origin <branch> -f” to force a commit to github, making the most recent commit the one you reverted back to using git reset.

Clone this wiki locally