Reset to state before pull
This question already has an answer here:
you could either do a git reset --hard HEAD
to get back to your previous state. But if that's something you tend to do regularly, and don't want to pay the risk of loosing files you forgot to commit, you'd want to make it as a workflow.
You can keep all those file in your index and stash them on pull
, and then git checkout origin/master
to get your repository in a sane state. Instead of the stash
you may even use branches that you merge/unmerge from your working branch.
There are also tools that help handle files as "patches" for local workspace that will never get in the synchronized index...
链接地址: http://www.djcxy.com/p/94774.html上一篇: 撤消git pull(强制更新)
下一篇: 拉动前重置为状态