티스토리 뷰

Dev/Server

gitHub 사용해 보기

마이스토리 2016. 2. 17. 15:37
1. git 설치하기
http://git-scm.com/downloads

2. git/gitHub 설정하기

- gitHub.com 에 계정생성

- git Bash 를 실행하여 타이핑. 로컬컴퓨터에 git을 사용할 준비작업
git config --global user.name "your name"
git config --global user.name "your@email.com"

3. 온라인 저장소 만들기
   gitHub.com 새로운 repository를 만든다. ( /testPrj1 )

4. 로컬 저장소 만들고 초기화
mkdir ~/gitRepo/testPrj1   (앞서 gitHub.com에서 만든 저장소와 동일한 이름으로)
cd ~/gitRepo/testPrj1
git init

5. 파일 생성하고 추가하기

touch Readme.txt

git add Readme.txt

git commit -m "add Readme.txt"

6. 로컬저장소와 깃허브 저장소 연결하기

git remote add origin https://github.com/jnj45/testPrj1

git remote -v     (원격origin에 대한 모든 항목 조회)

git push --set-upstream origin master


댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31