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

前端 未结 30 3481
失恋的感觉
失恋的感觉 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:07

    I have a strange situation that neither git clean or git reset works. I have to remove the conflicting file from git index by using the following script on every untracked file:

    git rm [file]
    

    Then I am able to pull just fine.

提交回复
热议问题