Git

[Git] git remote url 변경

개미맨 2019. 3. 28. 09:44

git remote url 변경 전

$ git remote -v 
origin  https://github.com/tj/commander.js.git (fetch) 
origin  https://github.com/tj/commander.js.git (push)

git remote push url 변경

$git remote set-url --push origin <원격지 저장소 주소>

$git remote set-url --push origin https://github.com/shelljs/shelljs.git

 

결과

$ git remote -v
origin  https://github.com/tj/commander.js.git (fetch)
origin  https://github.com/shelljs/shelljs.git (push)

git remote push, fetch url 변경

$git remote set-url origin <원격지 저장소 주소>

$git remote set-url origin https://github.com/shelljs/shelljs.git

 

결과

$ git remote -v
origin  https://github.com/shelljs/shelljs.git (fetch)
origin  https://github.com/shelljs/shelljs.git (push)