반응형

깃허브에 저장소를 생성 후 로컬 프로젝트를 푸시하는 방법입니다.

  1. 깃허브에 레포지토리를 생성한다.

  2. git bash / terminal 등을 연다.

  3. 푸시할 프로젝트 디렉토리로 이동

  4. 디렉토리에서 깃 init실행

    git init 
  5. 첫 커밋을 위해서 git add .

    git add .
  6. 첫 커밋 실행

    git commit -m "initial commit"
  7. 생성된 깃 레포지토리의 url 복사

  8. 커맨드창에서 리모트 레포지터리 url추가
    In the Command prompt, add the URL for the remote repository where your local repository will be pushed.

    git remote add origin [remote repository URL]  
    
    git remote -v
  9. 푸시

    git push -f origin master
반응형

'프로그래밍 > git' 카테고리의 다른 글

[git] git 공식 튜토리얼 문서. 깃튜토리얼  (0) 2015.03.21

+ Recent posts