How to undo a git pull?

前端 未结 6 793
灰色年华
灰色年华 2020-11-30 16:14

I would like to undo my git pull on account of unwanted commits on the remote origin, but I don\'t know to which revision I have to reset back to.

How can I just go

6条回答
  •  攒了一身酷
    2020-11-30 16:55

    git reflog show should show you the history of HEAD. You can use that to figure out where you were before the pull. Then you can reset your HEAD to that commit.

提交回复
热议问题