[git] 로컬 브랜치 -> 원격 저장소 업로드

순서

  1. 원격 저장소에서 git init --bare [프로젝트명].git 으로 저장소 생성
  2. 로컬 브랜치 폴더 이동 후 git init
  3. git remote add origin [remote 브랜치 url]
    ex ) git remote add origin ssh://id@1.2.3.4:20022/~/repo/sample.git
  4. 커밋 후 git push --set-upstream origin master
    만약 여기서 error: src refspec master does not match any 발생하면
    git push -u origin master 로 브랜치명 생성해서 푸시

중간에 이메일 등록해라 이름 넣어라 하는건 git 명령대로 따르면 된다.


이전 연결된 remote 저장소 지우기

git remote remove origin

Subscribe to X세대 신입사원

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe
774-86-01972 cinnabar.3d@gmail.com