如何修改Git的代码仓库的源地址

若是创建了一个远程代码库,而后遇到了远程代码库源地址修改的问题,怎么办呢?git

查看远程库源地址

#两种方法都是查看当前Git库源地址的

git remote -v
git remote -version

修改当前的源地址

#orgin为当前源地址名,[GIT URL]为欲修改源地址

git remote set-url origin [GIT URL]

 添加新的Git库源地址:url

#[NAME]为新的Git库源地址名,[GIT URL]为新的git库源地址

git remote add [NAME] [GIT URL]

 删除一个Git库源地址:spa

#[NAME]为Git库源地址名

git remote remove [NAME]
git remote rm [NAME]

合并远程源的代码

http://www.javashuo.com/article/p-puphclux-bk.html.net

相关文章
相关标签/搜索