$git clone repository주소
e.g) git clone https://github.com/noogoolgga/shipsa.git
$git remote -v
로 원격저장소에 연결이 되어있는지 확인하자.$git remote add <repositoryname> <repositoryrurl>
$git remote add origin https://github.com/noogoolgga/shipsa.git
을 통해 원격 저장소와 연결할 수 있다.$git remote remove origin
을 통해 연결되어있는 원격저장소를 끊을 수 있다.$git branch
로컬 브랜치 목록 조회
$git branch -r
원격 브랜치 목록 조회
$git branch -a
모든 브랜치 목록 조회
$git branch branch이름
으로 branch 생성
e.g) $git branch noogoolggabranch1
$mkdir foldername
와 비슷한 맥락
$git checkout branch branch이름
e.g) $git checkout noogoolggabranch1
$cd noogoolggabranch1
과 비슷한 맥락
(스테이징이란? - working directory와 Git repository 사이의 징검다리 역할)
$git add <파일이름/디렉토리경로>
$git add .
$git add -A
$git add -p
메세지는 상세할수록 좋다
$git commit -m "메세지"
$git push <저장소이름> <branch이름>
e.g) $git push origin noogoolggabranch1
origin이라는 원격 저장소에 올라가게 된다.