충돌 해소 절차는 다음과 같다.
Step 1) 파일 확인
$ git status On branch master You have unmerged paths. (fix conflicts and run "git commit") (use "git merge --abort" to abort the merge) Unmerged paths: (use "git add <file>..." to mark resolution) both modified: merge.txt (충돌 파일) |
Step 2) 파일 수정
편집기를 통해 파일을 수정한다.
$ cat merge.txt <<<<<<< HEAD this is some content to mess with content to append ======= totally different content to merge later >>>>>>> new_branch_to_merge_later |
Step 3) Add to index & commit
git add <conflicted files> git commit -m <commit message> |
Step 4) Push to origin
git push origin |