Git과 CLI (3) - 원격저장소 관련 CLI 명령어
원격저장소 관련 CLI 명령어 remote, push, pull 원격 저장소를 등록하는 CLI 명렁어는 다음과 같다. git remote add <원격저장소 이름> <원격저장소 주소> : 원격저장소를 등록한다. 원격저장소는 여러 개 등록할 수 있지만 같은 별명의 원격저장소는 하나만 가질 수 있다. 통상 첫 번째 원격저장소를 origin으로 칭한다. git remote -v : 원격저장소 목록을 살펴본다. 프로젝트를 만들면 원격저장소 URL과 clone 할 수 있는 명령어를 보여준다. yegang@yegangs:~/hello-git-cli$ git remote add origin https://github.com/yeganghwang/hello-git-cli.git yegang@yegangs:~/hello-git-cli$ git remote -v origin https://github.com/yeganghwang/hello-git-cli.git (fetch) origin https://github.com/yeganghwang/hello-git-cli.git (push) yegang@yegangs:~/hello-git-cli$ git push fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master To have this happen automatically for branches without a tracking upstream, see 'push.autoSetupRemote' in 'git help config'. yegang@yegangs:~/hello-git-cli$ 이전에 만들어 둔 hello-git-cli 폴더에 커밋을 푸시하면 오류가 발생한다. 왜냐하면 로컬저장소의...