ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

๋ฐ˜์‘ํ˜•

gitlab push ์˜ค๋ฅ˜ ํ•ด๊ฒฐ Updates were rejected because a pushed branch tip is behind its remote counterpart.

gitlab์— ๋นˆํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค๋•Œ readme.md๋ฅผ ๋งŒ๋“ค๊ณ  gitlab์—์„œ ํ•ด๋‹น ํŒŒ์ผ์„ ์‚ญ์ œ๋ฅผ ํ–ˆ๋‹ค
๋กœ์ปฌ์— ์ด๋ฏธ ๋งŒ๋“ค์–ด์ง„ ํ”„๋กœ์ ํŠธ๋ฅผ ์˜ฌ๋ฆฌ๋ ค๊ณ  ํ•˜๋‹ˆ push ๊ฑฐ์ ˆ์ด ๋ฐœ์ƒ์„ ํ•˜์˜€์„๋•Œ ๊ฐ•์ œ ํ‘ธ์‹œ ์„ค์ •์„ ํ•ด๋ณด์ž
# ๊ฐ•์ œ ํ‘ธ์‹œ
git push -u origin main -f

 

hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. If you want to integrate the remote changes,
hint: use 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

 

๊ฐ•์ œ ํ‘ธ์‹œ๋ฅผ ํ•˜์—ฌ๋„ rejected๊ฐ€ ๋ฐœ์ƒํ•˜์˜€๋‹ค. ์•„๋ฌด๋ž˜๋„ gitlab์— ๊ฐ•์ œ push ์„ค์ • ์˜ต์…˜์„ ์ผœ์ฃผ๋Š” ๊ณณ์ด ์žˆ์„ ๊ฒƒ ๊ฐ™์•„์„œ ์ฐพ์•„๋ดค๋‹ค

Setting -> Repository
Protected branches

Setting -> Repository -> Protected branches -> Allowed to force push ๋ฅผ ์ผœ์ฃผ์„ธ์š”

์˜ต์…˜ ์„ค์ • ์™„๋ฃŒํ›„ 

# ๊ฐ•์ œ ํ‘ธ์‹œ
git push -u origin main -f

๊ฐ•์ œ ํ‘ธ์‹œํ•˜๋ฉด ์ •์ƒ์ ์œผ๋กœ ์ฒ˜๋ฆฌ ๋ฉ๋‹ˆ๋‹ค. : )

๋ฐ˜์‘ํ˜•

'๐ŸŒ‹ Error Fixed' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

maven Blocked mirror for repositories  (0) 2023.10.13
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".  (0) 2022.01.13
๋ฐ˜์‘ํ˜•
๊ณต์ง€์‚ฌํ•ญ
์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
์ตœ๊ทผ์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€
Total
Today
Yesterday
๋งํฌ
ยซ   2024/07   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
๊ธ€ ๋ณด๊ด€ํ•จ
๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (56)
๐Ÿ“บ Develop (34)
๐ŸŒ‹ Error Fixed (3)
๐Ÿ— Tool (3)
๐Ÿ’ป MacBook M1 (15)
๐Ÿ“ฆ ETC (1)

์ด ํฌ์ŠคํŒ…์€ ์ฟ ํŒก ํŒŒํŠธ๋„ˆ์Šค ํ™œ๋™์˜ ์ผํ™˜์œผ๋กœ, ์ด์— ๋”ฐ๋ฅธ ์ผ์ •์•ก์˜ ์ˆ˜์ˆ˜๋ฃŒ๋ฅผ ์ œ๊ณต๋ฐ›์Šต๋‹ˆ๋‹ค.