develog

[git] merge conflict --ours --theirs 본문

카테고리 없음

[git] merge conflict --ours --theirs

냐옴 2023. 5. 10. 11:47

 

# --ours, 현재 브랜치 수정사항으로 반영하기 (모든 파일)
git checkout --ours -- .

# --theirs, 대상 브랜치 수정사항으로 반영하기 (모든 파일)
git checkout --theirs -- .

# --ours, 현재 브랜치 내용으로 머지 (특정 파일)
git checkout --ours README.md

# --theirs, 대상 브랜치 내용으로 머지 (특정 파일)
git checkout --theirs README.md

git add .
git commit -m 'resolve conflict'
git push
Comments