본문으로 이동

검색어를 입력하고 Enter를 누르세요.

Git Remote 저장소 변경하기

김 태영

작업을 하다보면 간혹 리모트 저장소의 위치를 변경해야 하는 경우가 있다.

현재 저장소 확인

git remote -v
origin  https://github.com/kty0529/wallel.git (fetch)
origin  https://github.com/kty0529/wallel.git (push)

저장소 정리

저장소에 수정사항은 없는지 업데이트 해보는게 좋다.

git fetch
git pull
git add .
git commit -m "clear"
git push

저장소 제거

git remote remove origin

새 저장소 연결

git remote add origin 새저장소URL

확인 및 최신화

git fetch
git pull

끝.

git, remote change, 저장소 변경