git remote set-url命令修改remote URL

git remote set-url传递两个参数

  • remote name。例如,origin或者upstream
  • new remote url。例如,git@github.com:USERNAME/OTHERREPOSITORY.git

例如:从SSH切换到HTTPS的远程URL

  1. 打开终端
  2. 切换到你项目的工作目录
  3. 列出remotes,是为了得到你想要改变的remote的名字
    xxxxxx@xxxxxx:~/workspace/goal$ git remote -v
    origin git@github.com:xxxxxx/SpringBoot.git (fetch)
    origin git@github.com:xxxxxx/SpringBoot.git (push)
  4. 使用git remote set-url命令从SSH到HTTPS的远程URL
    xxxxxx@xxxxxx:~/workspace/goal$ git remote set-url origin https://github.com/xxxxxx/SpringBoot.git
  5. 验证是否改变成功
    xxxxxx@xxxxxx:~/workspace/goal$ git remote -v
    origin https://github.com:xxxxxx/SpringBoot.git (fetch)
    origin https://github.com:xxxxxx/SpringBoot.git (push)

git-修改远程的URL的更多相关文章

  1. [转]git修改远程仓库地址

    原文链接:http://www.cnblogs.com/lazb/articles/5597878.html 问:Coding远程仓库地址变了,本地git仓库地址如何更新为最新地址 git修改远程仓库 ...

  2. git修改远程仓库关联

    公司搬移, 作为git仓库的服务器IP地址变了. 本地代码挺多,重新检出太占时间,可以修改一个什么配置让我本地仓库和新的远程仓库建立关联吗, 答案是肯定的! 方法有很多,这里简单介绍几种: 以下均以项 ...

  3. git修改远程仓库

    三种方式都可以. 1. 修改命令 git remte origin set-url URL 2.先删后加 git remote rm origin git remote add origin git@ ...

  4. git修改远程仓库名称[gitolite]

    参考 https://stackoverflow.com/questions/4708465/how-do-i-rename-a-git-repository-created-with-gitolit ...

  5. git修改远程仓库地址

    方法有三种: 1.修改命令 git remote set-url origin [url] 例如: git remote set-url origin gitlab@gitlab.chumob.com ...

  6. IDEA git修改远程仓库地址

    方法有三种: 方法1.修改命令 git remote set-url origin <url> 方法2.先删后加 git remote rm origin git remote add o ...

  7. git 修改远程仓库地址

    以前的老项目需要修改git路径,为了保留之前的上传记录和分支等可以通过以下方法解决这个问题 sourceTree项目远程仓库,直接修改origin路径,然后提交一个commit即可将项目上传到新的gi ...

  8. 如何更改vs2013中git的远程仓库url地址

    可以通过修改Git库配置文件实现,请看下图:

  9. git 修改远程仓库源

    自己已经写好了一个项目,想上传到 github github 创建新项目 新建 README.md , LICENSE 本地项目添加 github 远程仓库源 不是git项目 git remote a ...

  10. 批量替换git目录的远程仓库URL地址脚本

    需求: 1. 输入work-dir 工作目录 2. 扫描工作目录中的子目录 3. 对每一个子目录, 判断是否是git repo 4. 确认是git repo, 获取git origin remote- ...

随机推荐

  1. java URL、HTTP与HTML+CSS

    一.Web三大基石 1 二.API(Application Programming Interface,应用程序编程接口) 1 三.题目分析总结: 3 五.HTTP协议与寄信是类似的 6 请求报文 6 ...

  2. HDU_5536_Chip Factory

    Chip Factory Time Limit: 18000/9000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)T ...

  3. netty 网关 http请求 请求转发

    https://netty.io/4.1/xref/io/netty/example/proxy/package-summary.html https://netty.io/4.1/xref/io/n ...

  4. Writing a Discard Server 写个抛弃服务器 世上最简单的协议

    Netty.docs: User guide for 4.x https://netty.io/wiki/user-guide-for-4.x.html The most simplistic pro ...

  5. Spark源码分析 -- TaskScheduler

    Spark在设计上将DAGScheduler和TaskScheduler完全解耦合, 所以在资源管理和task调度上可以有更多的方案 现在支持, LocalSheduler, ClusterSched ...

  6. QT in VS 多语言实现(中英文切换,每个步骤都有截图,只有UTF8才能让Qt语言家正确读取。先qApp->removeTranslator,然后installTranslator,每个类都要写上槽函数RetranslateUI)

    最近项目需要软件具有中英文双语切换功能,而QT又自带此功能,现将实现方式记录下来. 说到中英文切换,少不了要了解QT的内部编码方式.在此就不详述QT编码方式了,具体可参考 彻底弄懂Qt的编码.只需要记 ...

  7. ReferenceQueue

    @Test public void strongReference() { Object referent = new Object(); /** * 通过赋值创建 StrongReference * ...

  8. IT开发工程师的悲哀现状和可能前途

    IT开发工程师的悲哀现状和可能前途 本文所指的开发工程师,仅指程序开发人员和以数字电路开发为主的电子工程师.当你选择计算机或者电子.自控等专业进入大学时,你本来还是有机会从事其它行业的,可你毕业时执迷 ...

  9. 登录plsql 报错 the account is locked --用户被锁

    登录数据库服务器,进入oracle用户下: [root@uumsnormal-oracle admin]# su - oracle [oracle@uumsnormal-oracle ~]$ sqlp ...

  10. Android Studio下编译调试 ndk 的示例

    https://github.com/googlesamples/android-ndk https://github.com/googlesamples android studio 手动安装cma ...