git config --global user.name "github_name"
git config --global user.email "github_email"
git config --list
// user.email, user.name 부분만 잘 들어갔는지 확인
// 맨처음에 프로젝트를 올릴때 사용,
git init
// 전부 다 업로드, git add 올릴 파일명
git add .
// 현재 상태를 알려주는 명령어
git status
// 히스토리를 만듦. upload에 대한 내용
git commit -m "first-commit"
// 레퍼지토리와 연결
git remote add origin ...............
// 연결된 레퍼지토리 확인
git remote -v
// 마스터 브랜치로 보낸다, git push origin 브랜치명
git push origin master
// 기존에 연결이 되어있다면 git init을 해주지 않아도 됨.
// 수정된 부분만 업로드됨
git add .
git commit -m "second commit"
git push origin master
// 레파지토리랑 연결 해제하기
git remote remove origin
// 레파지토리 재 연결
$ git remote add origin <url>
https://hackmd.io/@oW_dDxdsRoSpl0M64Tfg2g/ByfwpNJ-K
참고
// 브랜치 만들기
// 최근 커밋의 사본
// git branch 브랜치명
git branch coupon
// 브랜치 이동하기
git switch coupon
// 합칠때 기준이 되는 메인 브랜치로 이동
// coupon 브랜치에서 만든 코드를 main 브랜치로 합칠때
// 현재 main branch
git merge coupon