๐คทโ๏ธ vscode - ๊นํ๋ธ ๋ฒ์ ์ ๋ฐ์ดํธ Error ๐ฅ
์๋ก์ด ๋ฒ์ ์ ๋ฐ์ดํธ๋ฅผ ์ํด ํ์์ ๊ฐ์ด push! ํ์ง๋ง.. ์๋ฌ ๋ฐ์ error ์์ ํํ ์น๋ถ ์ค๋๋ ํด๊ฒฐํ๋ฌ ๊ฐ๋ณด์..
! [rejected] main -> main (fetch first)
error: failed to push some refs to 'https://github.com/sihyun22/CoffeeOrder-Web.git'
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to
hint: the same ref. If you want to integrate the remote changes, use
hint: 'git pull' before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
๐ซ ์์ธ
๊ฐ์ฅ ์ต๊ทผ ๊นํ๋ธ README.md ํ์ผ์ ์์ ํ์๋๋ฐ Local - Remote ๊ฐ์ ํ์ผ์ด ์๋ก ๋ค๋ฅด๊ธฐ ๋๋ฌธ์ ํ์ผ ์์ ๋ฌธ์ ๋ก
push๋ฅผ ๊ฑฐ๋ถ ํ๋ ๊ฒ์ด์๋ค! ๋ฐ.๋ผ.์ ๋๊ธฐํ๋ฅผ ๋จผ์ ํด์ค์ผํ๋ค.
๐ก ํด๊ฒฐ
1. git pull (repository ๊ฐ์ ธ์ค๊ธฐ)
๋ฉ์ธ์ง๊ฐ ๋ง๋ค์ด์ง๋ฉด ์ ์ฅํ๊ณ ๋์ค๋ฉด ๋๋ค. ( ๋ช ๋ น์ด :wq )
PS C:\Users\MIT-303\Desktop\psh\projects\web\kioskcoffee> git pull
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 10 (delta 2), reused 0 (delta 0), pack-reused 0 (from 0)
Unpacking objects: 100% (10/10), 3.54 KiB | 226.00 KiB/s, done.
From https://github.com/sihyun22/CoffeeOrder-Web
dda5495..061f458 main -> origin/main
hint: Waiting for your editor to close the file...
Merge made by the 'ort' strategy.
README.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 README.md
2. ๋ค์ push
PS C:\Users\MIT-303\Desktop\psh\projects\web\kioskcoffee> git push -u origin main
Enumerating objects: 41, done.
Counting objects: 100% (37/37), done.
Delta compression using up to 12 threads
Compressing objects: 100% (31/31), done.
Writing objects: 100% (31/31), 2.24 MiB | 1.89 MiB/s, done.
Total 31 (delta 5), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (5/5), completed with 4 local objects.
To https://github.com/sihyun22/CoffeeOrder-Web.git
061f458..c927d94 main -> main
branch 'main' set up to track 'origin/main'.
์ฝ๋ฉ ๊ณต๋ถ์ ๋ง์ง๋ง์ ๊น ํ๋ธ ๋ฒ์ ๊ด๋ฆฌ ! ๊ทผ๋ฐ ์ฌ๊ธฐ์ ์๋ฌ๋ฅผ ์ฒ์ ๋ง์ฃผํ๋ ์ฅ..? ์ด๊ฒ ๋ฌด์จ์ผ์ธ๊ฐ
ํ์ง๋ง ์๋ฌ๋ฅผ ํด๊ฒฐํ๊ณ ๊น๊ณผ ๊นํ๋ธ์ ์์ ํ๋ฆ์ ๊ณต๋ถํ๋ ์ข์ ๊ธฐํ๊ฐ ๋ ๊ฒ ๊ฐ์์ ๋ฟ๋ฏํ๋ค ^^
๋ค์์ ์ด๋ค ์๋ฌ๊ฐ ๊ธฐ๋ค๋ฆฌ๊ณ ์์๊น ์์ฃผ ๊ธฐ๋๊ฐ ๋๋ค๐คฃ๐คฃ