在使用 AI 開發, 每次的變動都會更新到 branch 上, 雖然在 IDE 裡 accept all, 實際運行的結果不滿意, 想退回去 git 上的 head 版本內容,
I have successfully reverted all changes and reset the repository to the HEAD version.
- Executed
git reset --hard HEAD
to discard all modified files. - Executed
git clean -fd
to remove any newly created untracked files or directories.
The codebase is now in the exact state of the last git commit.