[Git] Local Project를 GitHub에 등록하기

2015. 9. 18. 18:36 - Song's IT

# Local Project를 GitHub에 등록하기




(1) Local



 

① GitHub 로그인 후 Remote Repository 생성

GitHub(https://github.com/)에 접속하여  Local Project 를 관리할 새로운  Remote Repository 를 생성한다. 최초 등록시 Error를 발생시키지 않기위해 Remote Repository 생성 시  Initialize this repository with a README  옵션을 반드시 체크해제한다. README, license 등의 파일을 자동생성하여 Local Project의 Push시 Reject Error 가 발생하기 때문이다. 





② Command Prompt 실행 및 초기화

CMD를 실행시킨 후  Local Project 경로로 이동한다. 이후 아래 명령을 순차적으로 실행한다.
# Git 초기화
$ git init

# Local Project를 Add를 통해 Staging to index
$ git add .

# Staging을 실제 Local Repository로 저장
$ git commit -m "First Commit to existed local project"

# Remote Repository로 Push를 위 한 URL설정 및 확인
$ git remote add origin remote repository URL
$ git remote -v # Local to Remote Repository Push $ git push orign master


'Development > Git' 카테고리의 다른 글

[Git] Git설치 및 사용(Github)  (0) 2015.09.18

다른 카테고리의 글 목록

Development/Git 카테고리의 포스트를 톺아봅니다