Git Pull While Ignoring Local Changes?

前端 未结 12 1729
醉话见心
醉话见心 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 05:02

    This will fetch the current branch and attempt to do a fast forward to master:

    git fetch && git merge --ff-only origin/master
    

提交回复
热议问题