GitHub Repository 생성
private 또는 public 선택
Git 다운로드 및 Git Bash 환경설정
이름 입력
$ git config --global user.name "my_name"
GitHub 가입 이메일 입력
$ git config --global user.email "my_email"
정보 확인
$ git config --list
첫 프로젝트 업로드
$ git init
Reinitialized existing Git repository in 오류 발생 시
$ git remote -v 명령어로 원격 리모트 주소가 새로 생성한 리모트 주소인지 확인
만약 아닐 경우 $ git remote rm origin
모든 파일 업로드
$ git add .
특정 파일 업로드는 . 자리에 파일명 입력
$ git status
$ git commit -m "first commit"
m 은 메세지의 준말로 first commit 자리에 자유롭게 입력
$ git remote add origin https://github.com/GitHub ID/GitHub Repository.git
제대로 연결 되었는지 확인하고 싶을 경우 $ git remote -v
$ git push origin master
master 자리에는 branch 이름 입력
프로젝트 업데이트
$ git add .
$ git status
$ git commit -m "second commit"
$ git push origin master
팀 프로젝트 방법
$ git clone 주소 폴더이름
프로젝트 내 Code 클릭 후 HTTPS 주소 복사cd 폴더명
code .
$ git checkout -b 브렌치이름
$ git add .
$ git commit -m "first commit"
$ git push origin 브렌치이름
$ git pull origin master
pull 실행 전 기존 소스코드들 꼭 commit 해놓기
$ git checkout 브렌치이름