search

Home  >  Q&A  >  body text

How to undo git fetch

I executed git fetch on the non-master branch and pulled a lot of changes. How can I undo them?
In addition, I have a commit locally that has not been pushed yet. I want to undo the git fetch I just performed while retaining this commit. How should I do this?

phpcn_u1582phpcn_u15822849 days ago1186

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-02 09:27:03

    No need to undo, git fetch has no effect on local branches.

    reply
    0
  • Cancelreply