取消這次的變動, checkout git 的 head 版本

在使用 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.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *