Frontend/ETC
[GIT] github에 프로젝트 올리기 (git command 사용)
romeoh
2019. 7. 13. 16:39
반응형
[REACT.JS] CREATE-REACT-APP 없이 REACT.JS 프로젝트 생성하기
위 포스트에서 react.js 프로젝트를 생성했습니다.
이 프로젝트를 github에 올려보겠습니다.
sourcetree등 UI를 지원하는 git 프로그램을 사용할 수도 있지만
command 명령으로 올리는 방법을 알아봅니다.
Github에 repository생성
https://github.com 에서 로그인 하시고 New repository를 선택합니다.
HTTPS 주소를 복사합니다.
git 환경설정
$ git log
create-react-app으로 프로젝트를 생성하면 첫번째 커밋이 되어 있는 상태입니다.
git log로 history를 조회할 수 있습니다.
# git remote add origin "https://github.com/romeoh/first-project.git"
원격서버와 연결합니다.
$ git remote -v
원격지 주소 확인하기
$ git push --set-upstream origin master
푸시할때 인증 오류가 발생할 수 있습니다.
$ git push -u origin master
Username for 'https://github.com': MY_GITHUB_ID@gmail.com
Password for 'https://MY_GITHUB_ID@gmail.com@github.com':
새로고침하면 github에 소스가 올라간 것을 확인 할 수 있습니다.
반응형