echo "# asd" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/zmtlzmtl/저장소.git
git push -u origin main
git remote add origin https://github.com/zmtlzmtl/저장소.git
git branch -M main
git push -u origin main
내 github에서 새 repository 생성 및 주소 복사
터미널에서 remote url 확인
명령어 : git remote -v
remote 주소 변경
명령어 : git remote set -url origin "repository 주소"
주소 변경뒤 다시 git remote -v로 확인하면 바뀌어 있음
프로젝트를 업로드 해준다
vscode에서 또는 putty나 터미널 환경에서 ssh로 서버에 접속합니다.
현재 브랜치 확인
$ git branch
프로젝트 브랜치 목록 확인하기
$ git branch -a
브랜치 목록 중에서 바꿀 브랜치 풀경로로 복사
브랜치 변경
git branch -t 바꿀 브랜치 풀경로
-t는 브랜치를 받는 로컬쪽에 branch이름과 동일하게 branch를 생성하고 동시에 checkout합니다.