特定のcommitまで戻す方法を解説します。
以下のコマンドを実行し、コミットidを確認します。
git log
![](https://ootkblog.com/wp-content/uploads/2024/03/git-commit-reset-hard-commit-id-1.png)
以下のコマンドを実行し、コミットidで指定したコミットまで戻ります。
git reset --hard コミットid
![](https://ootkblog.com/wp-content/uploads/2024/03/git-commit-reset-hard-commit-id-2.png)
特定のcommitまで戻す方法を解説します。
以下のコマンドを実行し、コミットidを確認します。
git log
以下のコマンドを実行し、コミットidで指定したコミットまで戻ります。
git reset --hard コミットid