관리 메뉴

nkdk의 세상

github에 소스 올리는 방법 본문

My Programing/Version Control

github에 소스 올리는 방법

nkdk 2010. 11. 19. 19:26
이번에는 github에 소스 올리는 방법을 소개 할까 한다.
리눅스 위주.

ssh-keygen -t rsa 키를 생성하고 생성한 곳에서
나온 키를 https://github.com/account에 가서
SSH Public Keys 를 누르고 Add another public key를 클릭한다.

자 다시 리눅스로 돌아 와서
가령 /testrepo 라는 소스를 올리고 싶다면 다음과 같이 한다.

ssh-add -l
ssh-add ./test
ssh-add -l

mkdir testrepo
cd testrepo/
git init
여러 가지 파일을 넣어 놓는다.
git add test
git commit -m test
git show
git remote add test git@github.com:NKJason/test.git
git fetch test
git branch
git push test master

이렇게 하면.. 올라 간다.. 하악.. 뭔가 좀 복잡하다.
하지만 하나 하나 이해해 가다 보면 알게 될 것이다-.-;