How do I force “git pull” to overwrite local files?

前端 未结 30 3527
失恋的感觉
失恋的感觉 2020-11-21 11:35

How do I force an overwrite of local files on a git pull?

The scenario is the following:

  • A team member is modifying the t
30条回答
  •  我寻月下人不归
    2020-11-21 12:05

    git fetch --all
    

    then if you are on the master branch

    git reset --hard origin/master
    

    else

    git reset --hard origin/master
    

提交回复
热议问题