๊ฐ๋ฐ์ํ/Git
Clone์ผ๋ก ์์ฑํ ํ๋ก์ ํธ ์ด๊ธฐํ
cocococo331
2022. 5. 28. 21:29
ํ๋ก์ ํธ ์์ฑ ์ ๋ฆฌํฌ์งํ ๋ฆฌ ๋ง๋ค๊ณ ์๋ก ๊ตฌ์ฑํด์ ์ฌ๋ฆฌ๋ ๋ฐฉ๋ฒ๋ ์์ง๋ง,
๊ธฐ์กด ํ๋ก์ ํธ๋ฅผ Clone ํ์ฌ, ๊ธฐ์กด Git ์ฐ๊ฒฐ์ ๋๊ณ Commit๋ค์ ์ด๊ธฐํ ํ ํ ํ์ ํ์ผ๋ค๋ง ์ถ๋ ค์ ์ปค๋ฐ ํ๋ ๋ฐฉ์์ผ๋ก ์๋ก ๊ตฌ์ฑํ๋ ๋ฐฉ๋ฒ.
Clone ๋ฌ ์๊ฒฉ ๋ถํฐ ๋๊ธฐ
git remote -v
git remote remove origin
์๊ฒฉ ์ฐ๊ฒฐ ๋๊ณ ๋ ํ Git ์ด๊ธฐํ
rm -rf .git
git init
์ฒซ Commit ์์ฑ
git add .
git commit -m "Initial Commit"
์๊ฒฉ ์ ์ฅ์(Bitbucket, github ...)์ ์๋ก์ด Repository ์์ฑ
git ์ ์ฅ์ ์ฐ๊ฒฐ ํ ํธ์ฌ
git remote add origin {remoteUrl}
git push -u --force origin master
-u ์ต์ : ๋ด ๋ถํฐ๋ git push๋ง ํด๋ origin master์ ์๋ ํธ์ฌ