search

Home  >  Q&A  >  body text

github - All uncommitted changes were lost after git misoperated checkout --.

After using git add --all to add to the staging area, no submission was made. Then I performed the git reset head operation, and then performed the git checkout --. operation to clear all uncommitted data. However, I originally I wanted to clear out the changes in another branch, but everything I made in the afternoon was gone. Is it still possible to recover?

習慣沉默習慣沉默2793 days ago773

reply all(3)I'll reply

  • 黄舟

    黄舟2017-05-02 09:39:11

    Look at git reflog

    reply
    0
  • 某草草

    某草草2017-05-02 09:39:11

    There is a git fsck command that you can check out. There is also an article here that introduces git add and then executed the git reset hard command to finally retrieve the file. You can search for it

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-02 09:39:11

    Git reset head will clear the previous pull. I usually look for the previous code in the local history of the editing tool eclipse or idea. Most of them can be recovered.

    reply
    0
  • Cancelreply