Choose Git merge strategy for specific files (“ours”, “mine”, “theirs”)

后端 未结 3 1996
感情败类
感情败类 2020-11-29 15:00

I am in the middle of rebasing after a git pull --rebase. I have a few files that have merge conflicts. How can I accept \"their\" changes or \"my\" changes f

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 15:44

    For each conflicted file you get, you can specify

    git checkout --ours -- 
    # or
    git checkout --theirs -- 
    

    From the git checkout docs

    git checkout [-f|--ours|--theirs|-m|--conflict=