Hello, ๋‚˜๋‚˜'s world !

Git ) This branch has conflicts that must be resolved ๋ณธ๋ฌธ

๐Ÿ”จ์‚ฝ์งˆ์ผ๊ธฐ

Git ) This branch has conflicts that must be resolved

Nana0 2021. 1. 26. 23:50

 

ํŒ€์›๋“ค๊ณผ git์œผ๋กœ ํ˜‘์—…ํ•˜๋‹ค๋ณด๋ฉด ๊ฐ์ž branch๋ฅผ ๋งŒ๋“ค์–ด์„œ main ํ˜น์€ master ๋ธŒ๋žœ์น˜์— merge ์‹œํ‚ค๊ณค ํ•œ๋‹ค.

ํ•˜์ง€๋งŒ! merge๊ฐ€ ๋งˆ์Œ๋Œ€๋กœ ๋˜์ง€์•Š์„๋•Œ๊ฐ€ ์žˆ๋‹ค. 

"This branch has conflicts that must be resolved" ํ•ด๊ฒฐํ•ด์•ผํ•  ์ถฉ๋Œ์ด ์žˆ๋‹ค๋Š” ๊ฒƒ์ธ๋ฐ 

์ด๋•Œ๋Š” ์ถฉ๋Œ๋œ ์ฝ”๋“œ๋ถ€๋ถ„๋“ค์„ ์ˆ˜์ •ํ•˜๊ณ  ๋‹ค์‹œ ์ปค๋ฐ‹ ํ‘ธ์‰ฌํ•˜๋ฉด ๋œ๋‹ค.

 

 

๋ฐ์Šคํฌํ†ฑ์—์„œ ์ง„ํ–‰ํ•˜์—ฌ๋„ ์ข‹์ง€๋งŒ 

 

<๋จธ์ง€ํ•˜๋‹ค๊ฐ€ ์ปด์ด ๋‚˜๊ฐ€์‹  ์šธ ํŒ€์›๋ถ„์˜ ๋ชจ๋‹ˆํ„ฐ>

๊ฐ‘์ž๊ธฐ ์ปด์ด ๋‚˜๊ฐ€๋ฒ„๋ฆฌ๋ฉด ์ฒจ๋ถ€ํ„ฐ ๋‹ค์‹œํ•ด์•ผํ•˜๋Š” ๋ฒˆ๊ฑฐ๋กœ์›€์ด ... ๐Ÿ˜ฑ

 

๊ทธ๋ž˜์„œ Git Bash ์ด์šฉ์„ ์ถ”์ฒœํ•œ๋‹ค.

git merge master
git add .
git commit -m "์ ๊ณ ์‹ถ์€๋ง"
git push origin branchname

git merge master๋ฅผ ํ•˜๊ฒŒ๋˜๋ฉด 

(Android Studio ๊ธฐ์ค€) ์ถฉ๋Œ๋‚œ ํด๋ž˜์Šค๋“ค์ด ๋นจ๊ฐ„์ƒ‰ ๊ธ€์”จ๋กœ ๋ณ€ํ•ด์žˆ์„ ๊ฒƒ์ด๋‹ค.  ex)  MainActivity.java  

์ถฉ๋Œ๋‚œ ๋ถ€๋ถ„๋“ค์„ ์ˆ˜์ •ํ•ด์ค€ ๋’ค ๋‹ค์‹œ add , commit , push ํ•œ ํ›„ merge ํ•˜๋ฉด ์ž˜ ๋ณ‘ํ•ฉ์ด ๋œ๋‹ค.

Comments