Weitere รคhnliche Inhalte
รhnlich wie Yobi-hands-on-lab-at-d2fest (20)
Mehr von insanehong Kim (6)
Yobi-hands-on-lab-at-d2fest
- 2. http://dev.naver.com/d2
!
โข Yobi at NAVER Labs
!
โข FRENDS(Front-end Developers)
!
โข KGUG(Korea Git User Group)
!
โข Hackrslab Opens Source Team
!
โข http://about.me/insanehong
๋ฐํ์ ์๊ฐ
- 8. http://dev.naver.com/d2
์ฃผ์ ๊ธฐ๋ฅ๋ค
โข ์ด์ ํธ๋ ์ปค
!
โข ์ฝ๋ ์ ์ฅ์ - git, svn
!
โข ์ฝ๋ ๋ฆฌ๋ทฐ - block comment, line comment
!
โข ์จ๋ผ์ธ ์ฝ๋ ๋ธ๋ผ์ฐ์
!
โข ๊ฒ์ํ, ๋ง์ผ์คํค
!
โข ๊ทธ๋ฃน๊ธฐ๋ฅ, ๋ฉ์
, noti๏ฌcation ๋ฑ๋ฑ
- 10. http://dev.naver.com/d2
Git ์ค์ ํ๊ธฐ
$ git config --global user.name โusernameโ
# git commit ์ autor ์ ๋ณด๋ก ์ฌ์ฉ๋ username ์ค์
$ git config --global user.email "your_email@example.com"
# git commit ์ autor ์ ๋ณด๋ก ์ฌ์ฉ๋ email ์ค์
โข Username
โข Email
- 14. http://dev.naver.com/d2
Local ์ฝ๋ ์ ์ฅ์ ๋ง๋ค๊ธฐ
$ mkdir ~/hello-world
# ํ๋ก์ ํธ ๋๋ ํ ๋ฆฌ ์์ฑ
!
$ cd ~/hello-world
# ์์ฑํ ํ๋ก์ ํธ ๋๋ ํ ๋ฆฌ๋ก ์ด๋
!
$ git init
# git ์ ์ฅ์ ์ด๊ธฐํ - ํ์ฌ ๋๋ ํ ๋ฆฌ์ โ.gitโ ๋๋ ํ ๋ฆฌ๊ฐ ์์ฑ๋จ
!
$ git remote add origin ์๊ฒฉ ์ ์ฅ์ URL
# ์๊ฒฉ ์ ์ฅ์๋ก ์ฝ๋๋ฅผ ๋ณด๋ด๊ธฐ ์ํ ์๊ฒฉ์ ์ฅ์ URL ๋ฑ๋ก
# git remote add origin http://insanehong@yobi.d2fest.kr/insanehong/hello-world
!
$ git remote -v
# ๋ฑ๋ก๋ ์๊ฒฉ ์ ์ฅ์ ํ์ธ
โข Local ์ ์๋ก์ด git repository ์์ฑ - git init
- 15. http://dev.naver.com/d2
commit & push command ์ดํด(1)
$ touch README.md
# vi, text editor ๋ฑ์ ์ด์ฉํ์ฌ README.md ํ์ผ์ ์ด๊ณ โhello worldโ ๋ฅผ ์
๋ ฅํ๊ณ ์ ์ฅ
!
$ git status
# working directory ์ ๋ณ๊ฒฝ์ฌํญ ํ์ธ
!
$ git add README.md
# commit ์ด์ ์ working directory ๋ณ๊ฒฝ๋ด์ฉ์ staging ์์ญ์ผ๋ก ์ฎ๊น
!
$ git commit -m "์ปค๋ฐํ ๋ด์ฉ์ ์ต๋ํ ์์ธํ ์ ๋ ๊ฒ์ด ์ข์"
# git commit -m "initialize commit : add readme file"
# ์ฌ๋ฌ์ค์ ๋ฉ์ธ์ง๋ฅผ ๋จ๊ธฐ๊ณ ์ถ์ ๊ฒฝ์ฐ git commit ๋ง ์
๋ ฅ
!
$ git log
# commit ์ด ์ ๋๋ก ์ด๋ฃจ์ด์ก๋์ง ํ์ธ
!
$ git push origin master
# local repository ์ด๋ฃจ์์ง ์๋ก์ด commit ์ remote repository ๋ก push
- 18. http://dev.naver.com/d2
ํ๋ก์ ํธ ์ฝ๋ ๊ด๋ฆฌ ๋ฐ ๊ฐ๋ฐ ๋ฐฉ๋ฒ
โข Branching model
- commit ๊ถํ์ ๊ฐ์ง๊ณ ์์ด์ผ ํจ.
- ์๋ณธ ์ ์ฅ์๋ฅผ ๊ธฐ๋ฐ์ผ๋ก branch ๋ฅผ ๋๋์ด์ ๊ฐ๋ฐํ๋ ๋ฐฉ๋ฒ.
- master, devel, feature, ho๏ฌx ๋ฑ์ branch ๋ฅผ ๋๋์ด์ ๊ฐ๋ฐ
- git๏ฌow
โข Fork & Pull model
- commit ๊ถํ์ ๊ฐ์ง๊ณ ์์ง ์์ ์ฌ๋๋ค .
- ์๋ณธ ์ ์ฅ์์ commit ๊ถํ์ด ์์ด๋ ๋ณ๊ฒฝ์ฌํญ์ ๋ํ ๋ฐ์์ ์์ฒญ ํ ์ ์์
- 19. http://dev.naver.com/d2
์ Fork & Pull model ์ ์ค์ตํ๋์?
โข ๋ง์ Open Source Project ๋ค์ด ์ ํํ๊ณ ์๋ ์ฝ๋ ๊ธฐ์ฌ์ ๋ฐฉ๋ฒ
!
โข ํ ๋จ์ ํ๋ก์ ํธ์์๋ ์ฌ์ฉ๊ฐ๋ฅ ํ ๋ฐฉ๋ฒ ์ค ํ๋
!
โข Yobi ๋ Fork & Pull model ๋ฅผ ์ฌ์ฉํ์ฌ ๊ฐ๋ฐํ๋ ์ค
!
!
- 23. http://dev.naver.com/d2
Local์ ๋ณต์ฌํ ์ฝ๋ ์ ์ฅ์ ๋ง๋ค๊ธฐ
$ git clone ๋ณต์ฌํ ์ ์ฅ์ URL
# ์๋ณธ ์ ์ฅ์๊ฐ ์๋ ๋ณต์ฌํ ์ ์ฅ์์ URL ์ ์ฌ์ฉ.
# git clone http://insanehong@yobi.d2fest.kr/insanehong/yobi-hands-on
!
$ cd ~/yobi-hands-on
# ํ๋ก์ ํธ ๋๋ ํ ๋ฆฌ๋ก ์ด๋
!
$ git remote add upstream ์๋ณธ ์ ์ฅ์ URL
# ์๋ณธ ์ ์ฅ์ ๋ณ๊ฒฝ์ฌํญ์ ๋ฐ์์ค๊ธฐ ์ํด ์๋ณธ ์ ์ฅ์๋ฅผ upstream ์ผ๋ก ๋ฑ๋ก
# git remote add upstream http://insanehong@yobi.d2fest.kr/D2FEST2014/yobi-hands-on
!
$ git remote -v
# ๋ฑ๋ก๋ ์๊ฒฉ ์ ์ฅ์ ํ์ธ. ์๋ณธ ์ ์ฅ์์ ๋ณต์ฌํ ์ ์ฅ์๊ฐ ์ ๋ฑ๋ก๋ผ์๋์ง ํ์ธ
โข ๋ณต์ฌํ ์ ์ฅ์ ๋ฐ์์ค๊ธฐ - git clone
- 24. http://dev.naver.com/d2
์๋ก์ด ํ์ผ์ ๋ง๋ค์ด ๋ณต์ฌํ ์ ์ฅ์์ ์ฌ๋ฆฌ๊ธฐ (1)
$ cp ./whoami.md ./whoami-00.md
# whoami.md ํ์ผ ๋ณต์ฌํ๊ณ vi, text editor ๋ฑ์ ํตํด์ ๋ด์ฉ์ ์์ .
!
$ git add whoami-00.md
# git add whoami-00.md
!
$ git commit -m "์๋ก์ด ์ปค๋ฐ์ ๋ํ ์์ํ ์ค๋ช
"
# git commit -m "whoami.md ํ์ผ์ ๋ณต์ฌํด์ whoami-00.md ํ์ผ์ ๋ง๋ค๊ณ
ํ๋กํ ์
๋ ฅ ํจ"
!
$ git push origin master
# ๋ณต์ฌ ํ ์๊ฒฉ ์ ์ฅ์์ ์๋ก์ด commit ๋ด์ฉ์ push
# ์๋ณธ์ ์ฅ์๊ฐ ์๋ ๋ณต์ฌํ ์ ์ฅ์๋ก push ํ๋ ๊ฒ์ด ํต์ฌ
โข forked repository ์ new commit & push ํ๊ธฐ
- 31. http://dev.naver.com/d2
์ฝ๋ ๋ฆฌ๋ทฐ(2)
# vi, text editor ๋ฑ์ ์ด์ฉํด์ ๋ฆฌ๋ทฐ ๋ด์ฉ์ ๋ฐ์ํ์ฌ ์์ .
!
$ git add whoami-00.md
!
$ git commit -m "์๋ก์ด ์ปค๋ฐ์ ๋ํ ์์ํ ์ค๋ช
"
# git commit -m โ๋ถํ์ํ ๋๋ค์ ์ ๋ณด ์ญ์ "
!
$ git push origin master
# ๋ฆฌ๋ทฐ๋ฅผ ๋ฐ์ํ์ฌ ์ถ๊ฐ๋ commit ์ ๋ณต์ฌ๋ ์ ์ฅ์๋ก push
# git push origin master
โข ์ฝ๋ ๋ฆฌ๋ทฐ ๋ฐ์ํด์ commit & push ํ๊ธฐ
- 36. http://dev.naver.com/d2
์๋ณธ์ ์ฅ์์ ๋ณ๊ฒฝ๋ ๋ด์ฉ์ local ์ ์ฅ์์ ๋ฐ์ํ๊ธฐ(3)
$ git fetch upstream
# ์๋ณธ ์ ์ฅ์์ ๋ณ๊ฒฝ๋ ๋ด์ฉ(commit)์ ๋ฐ์์จ๋ค.
!
$ git merge upstream/master
# ์๋ณธ ์ ์ฅ์์์ ๋ฐ์์จ ๋ณ๊ฒฝ ๋ด์ฉ์ local ์ ์ฅ์์ ๋ณํฉ
!
$ git log master
# ์ถ๊ฐ๋ commit ๋ด์ฉ ํ์ธ
โข merge ๋ commit์ local ์ ์ฅ์์ master branch ์ ๋ฐ์
- 40. http://dev.naver.com/d2
์ฐธ๊ณ ํ ๋งํ reference
http://www.๏ฌickr.com/photos/jakla/499224896/http://www.๏ฌickr.com/photos/slworking/8149338837/
โข http://git-scm.com/book/ko/ - Progit ํ๊ธ ๋ฒ์ญ
!
โข ์ด์์ด๋ฉด Progit ์ข
์ด ์ฑ
์ ์ฌ์ ๋ณด์๋ ๊ฒ์ ์ถ์ฒ
!
โข https://www.facebook.com/groups/kgugs/ - KGUG
!
โข http://insanehong.kr/category/yobi/