GitHub에 코드 올리기
로컬에 저장된 프로젝트를 GitHub에 올리는 방법
- 로컬에 있는 프로젝트 안으로 경로는 변경하여
Git Bash를 실행한다.
git init: Git 명령어를 실행할 수 있게 해준다.
git status 후 git add . 또는 git add
git commit -m "msg"
git remote add origin 후 자신의 github 프로젝트 계정에 연결(https://github.com/your github account/github project name.git)
git remote -v github 주소가 맞는지 확인
- 주소가 맞지 않다면,
git remote set-url origin https://github.com/your github account/github project name.git
git push origin master: 원격 저장소로 push한다.
- Github페이지에서 정상적으로 push가 되었는지 확인한다.
!! 처음 push하는 pc에서는 access와 관련하여 메일이 오고 push가 안될 수 있다. github security페이지에서 수정 후 다시 push하면 정상작동한다.
댓글
댓글 쓰기