git - merge conflict when local is deleted but file exists in remote

前端 未结 6 768
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 04:58

I am very new to git and wondered how I should go about a merge where in the local repo I have deleted several files on the master branch but these files exist within the re

6条回答
  •  抹茶落季
    2020-11-28 05:33

    The best-rated answer focuses on the way to resolve the conflict.

    Before that, you probably want to know what the remote changed in the locally removed files.

    To do that, you can see the changes with:

    git diff --base
    

    From https://git-scm.com/docs/git-diff#Documentation/git-diff.txt--1--base

    Compare the working tree with the "base" version [...]. The index contains these stages only for unmerged entries i.e. while resolving conflicts.

提交回复
热议问题