Eclipse x Github ์ฐ๋
1.
2.
Github ํ์๊ฐ์
3.
Repository ์์ฑ
4.
Git Clone
5.
Share Project
6.
Commit & Push
7.
Pull
Github ํ์๊ฐ์
Repository ์์ฑ
Git Clone
git init โ GitHub repository ์ฐ๊ฒฐ โ push ๋ฐฉ์
์ ์ ์กฐ๊ฑด
โข
Eclipse๊ฐ ์ค์น๋์ด ์์
โข
EGit ํ๋ฌ๊ทธ์ธ ํฌํจ (๋ณดํต Eclipse ๊ธฐ๋ณธ ํ์ฌ)
โข
GitHub ๊ณ์ ์์
โข
GitHub์ **๋น ์ ์ฅ์(repository)**๋ฅผ ๋ฏธ๋ฆฌ ๋ง๋ค์ด๋ (์: myproject)
๋จ๊ณ๋ณ ์ค์
ํ๋ก์ ํธ์ Git ์ด๊ธฐํ (git init)
1.
Eclipse Project Explorer์์ ํ๋ก์ ํธ ์ฐํด๋ฆญ
2.
Team โ Share Project... ํด๋ฆญ
3.
Git ์ ํ โ Next
4.
Create Repository ์ฒดํฌ โ ๊ฒฝ๋ก ํ์ธ ํ Finish
โ ์ด๋ฌ๋ฉด .git ํด๋๊ฐ ์๊ธฐ๋ฉฐ Git ์ด๊ธฐํ ์๋ฃ
GitHub ์๊ฒฉ ์ ์ฅ์(remote) ์ฐ๊ฒฐ
1.
Git Repositories ๋ทฐ ์ด๊ธฐ
(์๋จ ๋ฉ๋ด โ Window โ Show View โ Other... โ Git โ Git Repositories)
2.
๋ฐฉ๊ธ ๋ง๋ ๋ก์ปฌ ์ ์ฅ์ ์ ํ
3.
๋ง์ฐ์ค ์ค๋ฅธ์ชฝ ํด๋ฆญ โ Remotes โ Create Remote...
4.
์ด๋ฆ์ origin ์
๋ ฅ โ OK
5.
Configure Push... ํด๋ฆญ
โข
URI:
https://github.com/๊นํ๋ธ์์ด๋/๋ ํฌ์ด๋ฆ.git
โข
Username, Password (๋๋ Personal Access Token ์
๋ ฅ)
6.
Next โ Finish
์ปค๋ฐ(commit) & ํธ์(push)
1.
ํ๋ก์ ํธ ์ฐํด๋ฆญ โ Team โ Commit...
2.
์ปค๋ฐ ๋ฉ์์ง ์
๋ ฅ ํ Commit and Push ํด๋ฆญ
3.
๋ธ๋์น ์ด๋ฆ(main ๋๋ master) ํ์ธ โ Finish
์ด์ GitHub์์ ์๋ก๊ณ ์นจํ๋ฉด ์ฝ๋๊ฐ ์ฌ๋ผ๊ฐ ์์ต๋๋ค 
์ฐธ๊ณ (ํฐ๋ฏธ๋ ๋ช
๋ น์ผ๋ก ๋์ผํ๊ฒ ํ๋ ค๋ฉด)
cd your_project
git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/username/repo.git
git push -u origin main
Bash
๋ณต์ฌ
์๋ฌ ์์ฃผ ๋๋ ๋ถ๋ถ
๋ฌธ์ | ์์ธ | ํด๊ฒฐ |
rejected non-fast-forward | GitHub์ ๊ธฐ์กด ์ฝ๋๊ฐ ์์ | GitHub repo ๋น์ฐ๊ฑฐ๋ git pull --rebase origin main ํ ๋ค์ push |
์ธ์ฆ ์คํจ | ํ ํฐ ๋ฏธ์ฌ์ฉ | GitHub Personal Access Token ๋ฐ๊ธ ํ ์ฌ์ฉ |
๋ธ๋์น ๋ค๋ฆ | master vs main ๋ถ์ผ์น | git branch -M main์ผ๋ก ํต์ผ |









