📚 Reference
가장 쉬운 Git 강좌 - (하) Github편
git remote add (원격명) (Github 레포지토리 주소)
git remote
# …or push an existing repository from the command line
#깃헙 레포지토리를 origin이라는 이름의 원격저장소로 저장하겠다.
git remote add origin https://github.com/2nchanter/github-practice.git
git push -u (원격명) (원격 브랜치명)
# 이후에는 git push만 입력해도 됨
# Github에 해당 이름의 브랜치가 없을 때는 새로 생성됨
git clone (원격명)
git fetch
git branch -a
# 이후에는 git pull만 입력해도 됨
# Github의 원격 브랜치까지 확인하기
뭔가 push하기 전에 꼭 pull로 추가 커밋이 없는지 확인하고 하자.
근데 어차피 full update 받기 전까지는 내쪽에서 push 할 수가 없다.
git checkout -b (새 브랜치명) (원격명)/(원격의 브랜치명)
git push -d (원격명) (브랜치명)