Revert to a previous commit

List commits in log

 git log
commit e6e49de47dcfa2970f1229f8463d0f4c948a14ac (HEAD -> main, origin/try_adding_type_docs, origin/main, origin/HEAD, try_adding_type_docs)
Date:   Wed Jul 9 18:48:14 2025 -0400

    Trying to fix the docs sidebar by adding type: docs

commit 237412d0a0714b33c8a20264096c34a592132c3a (origin/remove_guides_test_sidebar_breaks, remove_guides_test_sidebar_breaks)
Date:   Wed Jul 9 17:19:13 2025 -0400

    Removing guides dir; updating config

commit 96c431aaf2cd83f0726c1b97edee0c3484bae9a1
Date:   Wed Jul 9 15:56:50 2025 -0400

    Doh, doc was set to draft somehow

commit c67abb5b28a0cf470ab1536f793519639d04709d (origin/add_content_test_docs_sidebar, add_content_test_docs_sidebar)
Date:   Wed Jul 9 15:36:07 2025 -0400

    Added content to test auto sidebar

I want to revert to the commit before commit 237412d0a0714b33c8a20264096c34a592132c3a so I want to revert to commit 96c431aaf2cd83f0726c1b97edee0c3484bae9a1.

Create a new branch to track this action

git checkout -b revert_to_before_deleting_guides
Switched to a new branch 'revert_to_before_deleting_guides'

Revert to the commit

git revert --no-commit 96c431aaf2cd83f0726c1b97edee0c3484bae9a1..HEAD

Commit and merge revert

git add .
git commit -am "Reverting to before I deleted guides so I can continue adding content"
git push --set-upstream origin revert_to_before_deleting_guides
git checkout main
git pull origin main
git merge revert_to_before_deleting_guides
git add .
git commit
git push

Skadoosh