git

[Git] Please commit your changes or stash them before you merge.

๐Ÿ‘‰ ์ˆ˜์ •์‚ฌํ•ญ์„ stash(์ž„์‹œ๊ณต๊ฐ„์œผ๋กœ ์˜ฎ๊น€) ํ•œ ๋‹ค์Œ, ์›๊ฒฉ ์ €์žฅ์†Œ๋ฅผ pull ๋ฐ›๊ณ  stash ํ•ด๋†“์€ ๊ฒƒ์„ ๋‹ค์‹œ ๋ถˆ๋Ÿฌ์˜ค๋ฉด ๋œ๋‹ค.

 

1. git pull origin ๋ธŒ๋žœ์น˜์ด๋ฆ„
  - ์˜ค๋ฅ˜ ๋ฐœ์ƒ : Please commit your changes or stash them before you merge.
2. git stash
  - ๋‚ด ์ˆ˜์ •์‚ฌํ•ญ์„ ์ž„์‹œ ์ €์žฅ๊ณต๊ฐ„์œผ๋กœ ์ž ์‹œ ์˜ฎ๊ธด๋‹ค
3. git pull origin ๋ธŒ๋žœ์น˜์ด๋ฆ„
4. git stash pop
  - ๋‚ด๊ฐ€ ๋กœ์ปฌ์— ์ˆ˜์ •ํ•œ ์‚ฌํ•ญ๊ณผ ์›๊ฒฉ์ €์žฅ์†Œ์—์„œ pull ๋ฐ›์€ ์†Œ์Šค๊ฐ€ merge ๋œ๋‹ค.
5. ์†Œ์Šค ์ˆ˜์ •
6. git add .
7. git commit -m "์ปค๋ฐ‹๋ฉ”์‹œ์ง€"
8. git push origin ๋ธŒ๋žœ์น˜์ด๋ฆ„

pull ๋ฐ›๊ธฐ ์ „์— commitํ•˜๊ณ  push ํ•˜์ง€ ๋ง ๊ฒƒ!

 

 

 

์ถœ์ฒ˜ : https://webstudynote.tistory.com/116

 

[Git] Please commit your changes or stash them before you merge. ํ•ด๊ฒฐ๋ฐฉ๋ฒ•

ํ”„๋กœ์ ํŠธ๋ฅผ ํ•˜๋ฉด์„œ ํŒ€์›๋“ค์ด ์ด ์˜ค๋ฅ˜๋กœ 3๋ฒˆ์€ ๋ถ€๋ฅธ ๊ฒƒ ๊ฐ™๋‹ค. Your local changes to the following files would be overwritten by merge: ํŒŒ์ผ๋ช… Please commit your changes or stash them before you ..

webstudynote.tistory.com

 

'git' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[Git] ํŒŒ์ผ์˜ ์ƒํƒœ์™€ ๋ผ์ดํ”„ ์‚ฌ์ดํด  (0) 2022.01.15
[Git] ๊ฐ•์ œ Pull  (0) 2021.05.25
[Git] ๊ธฐ๋ณธ ๋ช…๋ น์–ด  (0) 2021.05.04