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

前端 未结 30 3525
失恋的感觉
失恋的感觉 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条回答
  •  旧时难觅i
    2020-11-21 12:15

    The only thing that worked for me was:

    git reset --hard HEAD~5
    

    This will take you back five commits and then with

    git pull
    

    I found that by looking up how to undo a Git merge.

提交回复
热议问题