형상관리/git
기존 프로젝트를 새로운 git repository에 올리기
멋진놈
2024. 7. 25. 13:00
728x90
터미널 창에
1. git 초기화
git init
2. repository 연결
git remote add origin http://localhost:3000/Team.DandyDev/report-service.git (깃주소)
연결된 git fetch/ push 주소 확인
git remote -v
3. 브랜치 대상으로 check out
git checkout -b main
4. repository 원격 브랜치로 commit, push 하기 => git repository에 올리기
git add .
git commit -m 'first'
git push origin main
이렇게 진행시 새로운 repository에 원격 브랜치 main 생성되며 업로드 됨.