반응형
참고 : http://bunhere.tistory.com/324
github에 resume repo를 만들어보기로 마음먹었다.
일단 resume repo를 생성하여 index.html을 넣었다.
물론 master branch에 넣은 파일은 아무런 의미가 없다.
1) master branch 설정하기.
# mkdir resume
# cd resume/
# git init
Initialized empty Git repository in /workspace/github/resume/.git/
# touch index.html
# git add index.html
# git commit -m "Add index.html in master branch"
[master (root-commit) 481a88e] Add index.html in master branch
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 index.html
# git remote add origin git@github.com:bunhere/resume.git
# git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 244 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:bunhere/resume.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
2) gh-pages branch 설정하기.
# git symbolic-ref HEAD refs/heads/gh-pages
# rm .git/index
# git add index.html
# git commit -m "Add index.html in gh-pages branch"
[gh-pages (root-commit) f9cf437] Add index.html in gh-pages branch
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 index.html
# git push origin gh-pages
Counting objects: 3, done.
Writing objects: 100% (3/3), 246 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:bunhere/resume.git
* [new branch] gh-pages -> gh-pages
이제 http://bunhere.github.com/resume/ 로 들어가면 된다.
github에 resume repo를 만들어보기로 마음먹었다.
일단 resume repo를 생성하여 index.html을 넣었다.
물론 master branch에 넣은 파일은 아무런 의미가 없다.
1) master branch 설정하기.
# mkdir resume
# cd resume/
# git init
Initialized empty Git repository in /workspace/github/resume/.git/
# touch index.html
# git add index.html
# git commit -m "Add index.html in master branch"
[master (root-commit) 481a88e] Add index.html in master branch
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 index.html
# git remote add origin git@github.com:bunhere/resume.git
# git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 244 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:bunhere/resume.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
2) gh-pages branch 설정하기.
# git symbolic-ref HEAD refs/heads/gh-pages
# rm .git/index
# git add index.html
# git commit -m "Add index.html in gh-pages branch"
[gh-pages (root-commit) f9cf437] Add index.html in gh-pages branch
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 index.html
# git push origin gh-pages
Counting objects: 3, done.
Writing objects: 100% (3/3), 246 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:bunhere/resume.git
* [new branch] gh-pages -> gh-pages
이제 http://bunhere.github.com/resume/ 로 들어가면 된다.
반응형
'Open Source > git' 카테고리의 다른 글
[GIT] windows에서 invalid username (wincred) (0) | 2016.10.18 |
---|---|
commit.template - default commit message (2) | 2012.07.12 |
github에 내 사이트 만들기. (1) | 2012.01.17 |
svn과 proxy (0) | 2010.08.11 |
Git 사용법(Manual) (1) | 2010.01.10 |