Git conflict 해결방법
master
의 변경사항이 존재하며, local
에 변경사항이 존재할때 conflict 발생error: Your local changes to the following files would be overwritten by merge:
test.py
Please commit your changes or stash them before you merge.
1) git stash
: save local change
(base) C:git_test>git stash
Saved working directory and index state WIP on master: 3a879aa add py
2) git pull
: Update the file as upstream
master
버전으로 최신화3) git stash apply
: merge
<<<<<<< Updated upstream (server)
import numpy as ndsdsddsds
=======
import numpy as npd
import pandas as pd
>>>>>>> Stashed changes (local)
4) 문서 수정
updated upstream
: file change in githubstashed upstream
: file change in local