๐๐จ๐๐๐ฒ ๐ ๐๐๐๐ซ๐ง 2022.08.04.๋ชฉ
์ง๋ ์ผ์ฃผ์ผ ๊ฐ ๋ง๋ฌ๋ git merge conflict
git pull ๋ฐ์์์ ๋ git conflict -- MERGING
Automatic merge failed; fix conflicts and then commit the result.
์ถฉ๋๋ ํ์ผ์ ๋ค์ด๊ฐ๋ฉด ์ถฉ๋์ด ์ผ์ด๋ ๋ถ๋ถ์ด ๋์ค๋๋ฐ
<<<HEAD… ์๋ถ๋ถ์ ๋ณด๋ฉด ์ต์ ๋ค์ด ์๋๋ฐ
์ฒซ๋ฒ์งธ ์ต์ ์ ํ์ฌ ๋ด ์ฝ๋ ๊ทธ๋๋ก ์ ์ง/ ๋๋ฒ์งธ๊ฐ ๋ฐ๋ ์ฝ๋๋ก ๋ณ๊ฒฝํ๋ ๊ฒ (์๊ธฐ๊ฐ ์ํ๋ ์ต์ ํด๋ฆญ)
์์ ํ ํ์ผ์ ์ ์ฅ ํ ํฐ๋ฏธ๋์์
git add .
git commit
์์ ๋ชฉ๋ก์ด ๋๋ ๋ ๊น์ง enterํค๋ฅผ ๋๋ฌ ์ด๋ ํ
i๋ฅผ ๋๋ฌ ์์ ๋ชจ๋๋ก ๋ค์ด๊ฐ commit ๋ฉ์์ง๋ฅผ ์ด ํ
esc๋ฒํผ์ ๋๋ฌ ์์ ๋ชจ๋๋ฅผ ๋น ์ ธ๋์จ ํ
:wq ์ ๋ ฅ ํ ์ํฐํ๋ฉด merge๊ฐ ๋จ!
git pull์ git conflicts ์์ ํ ์ ์๋ ํ์ผ๋ค ๊ฐ์ ๋ก ๋ฎ์ด์์ธ๋
(cannot merge binary files)
https://nochoco-lee.tistory.com/117
https://stackoverflow.com/questions/278081/resolving-a-git-conflict-with-binary-files
//๋ฐ์์ค๋ ํ์ผ๋ก ๋ฎ์ด์์ธ๋
git checkout --theirs --[์ถฉ๋ ํ์ผ]
//์๋ ํ์ผ๋ก ๋ฎ์ด์์ธ๋
git checkout --ours --[์ถฉ๋ํ์ผ]
//ํ์ผ์ด ๋๋ฌด ๋ง์์ ํ์ผ์ ๋ค ๋ฎ์ด ์์ฐ๊ณ ์ถ๋ค๋ฉด
git checkout --theirs .
git checkout --ours .
git add .
git commit
i
<commit ๋ฉ์์ง ์์ฑ>
esc๋ฒํผ
:wq
enter
'๐๐จ๐๐๐ฒ ๐ ๐๐๐๐ซ๐ง' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๐๐จ๐๐๐ฒ ๐ ๐๐๐๐ซ๐ง 2022.08.25.๋ชฉ (0) | 2022.08.25 |
---|---|
๐๐จ๐๐๐ฒ ๐ ๐๐๐๐ซ๐ง 2022.08.06.ํ (0) | 2022.08.06 |
๐๐จ๐๐๐ฒ ๐ ๐๐๐๐ซ๐ง 2022.07.26.ํ (0) | 2022.07.26 |
๐๐จ๐๐๐ฒ ๐ ๐๐๐๐ซ๐ง 2022.07.25.์ (0) | 2022.07.26 |
๐๐จ๐๐๐ฒ ๐ ๐๐๐๐ซ๐ง 2022.06.15.์ (0) | 2022.06.15 |
๋๊ธ