기업에 입사하였을때, 상황을 재연한다면..
조직이 사용해온 기존 Remote repository가 존재하지만
Local Repository(개인 서버)는 생성하지 않은 상태에서 모든 업무를 시작하게될 것.
이럴 때 가장 먼저 해야할 일은 이 Remote repository를
나의 Local repository로 복제하기 >> 해당 명령어 : Git clone
- 1~4.에 해당하는 모든 과정을 Git clone 명령어로 해결할 수 있음
git clone https://github.com/<repository>.git
- git clone with username and token
git clone https://<username>:<token>@github.com/<repository>.git
git branch # local branch만 조회(검색)하는 명령어
git branch -r # remote branch
git branch -a # local과 remote branch를 함께 조회
git branch <brnach name>
git checkout <branch name>
git checkout -b <branch01>
git push origin <branch name>
[에러발생 문구] User@DESKTOP ~/HelloGit (branch02)
$ git branch -d branch02
error: Cannot delete branch 'branch02' checked out at 'C:/Users/HelloGit'
git branch -d <branch name>
git branch -d branch02 # 예시
git push origin --delete <branch name>
git push origin --delete branch02 # 예시