
git remote add origin (원격 저장소 주소)
git branch -M main
git push -u origin main
git remote -v
(로컬 프로젝트와의 연결만 없애는 것. 깃헙의 레포지토리는 지워지지 않음)
git remote remove (origin 등 원격 이름)
git clone (원격 저장소 주소)
git push
git push -u origin main으로 대상 원격 브랜치가 지정되었기 때문에 가능git pull
git pull --no-rebase - merge 방식reset으로 되돌린 다음 아래 방식도 해보기git pull --rebase - rebase 방식git push --forcegit push -u origin (원격 branch)
git branch --all
깃헙에서 브랜치 생성
git branch -a 에서는 보이지 않음
원격의 변경상태 확인
git fetch
git switch -t origin/(브랜치명)
git push (원격 이름) --delete (원격의 브랜치명)