Git Pull While Ignoring Local Changes?

前端 未结 12 1746
醉话见心
醉话见心 2020-12-04 04:29

Is there a way to do a git pull that ignores any local file changes without blowing the directory away and having to perform a git clone?

12条回答
  •  隐瞒了意图╮
    2020-12-04 04:52

    Look at git stash to put all of your local changes into a "stash file" and revert to the last commit. At that point, you can apply your stashed changes, or discard them.

提交回复
热议问题