码迷,mamicode.com
首页 > Web开发 > 详细

Changing a remote's URL

时间:2016-05-05 14:40:49      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:

参考: https://help.github.com/articles/changing-a-remote-s-url/
The git remote set-url command changes an existing remote repository URL.

The git remote set-url command takes two arguments:
An existing remote name. For example, origin or upstream are two common choices.
A new URL for the remote.

List your existing remotes in order to get the name of the remote you want to change.

git remote -v
origin git@github.com:USERNAME/REPOSITORY.git (fetch)
origin git@github.com:USERNAME/REPOSITORY.git (push)
Change your remote‘s URL from SSH to HTTPS with the git remote set-url command.

git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git
Verify that the remote URL has changed.

git remote -v
# Verify new remote URL
origin https://github.com/USERNAME/OTHERREPOSITORY.git (fetch)
origin https://github.com/USERNAME/OTHERREPOSITORY.git (push)

Changing a remote's URL

标签:

原文地址:http://www.cnblogs.com/qike/p/5461649.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!