以前的老项目需要修改git路径,为了保留之前的上传记录和分支等可以通过以下方法解决这个问题

  1. sourceTree项目远程仓库,直接修改origin路径,然后提交一个commit即可将项目上传到新的git路径
  2. 命令行
    • cd .git //进入项目git目录
    • vim config //修改config配置文件,快速找到remote "origin"下面的url并替换即可实现快速关联和修改
    • git commit -m "提交一个commit"

git 修改远程仓库地址的更多相关文章

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

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

  2. git修改远程仓库地址

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

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

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

  4. git切换远程仓库地址

    $ git remote  -vorigin  http://192.168.1.100/aaa/Project.git (fetch)origin  http://192.168.1.100/aaa ...

  5. git修改远程仓库关联

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

  6. git 更换远程仓库地址

    1. 更改软件仓库指向.在github改了用户名和仓库名称后,仓库地址也相应的发生的变化,这时候就需要更新本地仓库以指向新的远程仓库地址: $git remote set-url origin git ...

  7. git 操作远程仓库地址

    查看所有远程仓库地址: git remote -v 更改远程仓库地址: git remote set-url origin newUrl 查看某一个远程仓库地址: git remote get-url ...

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

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

  9. git修改远程仓库

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

随机推荐

  1. Lightoj 1348 Aladdin and the Return Journey (树链剖分)(线段树单点修改区间求和)

    Finally the Great Magical Lamp was in Aladdin's hand. Now he wanted to return home. But he didn't wa ...

  2. js获取屏幕

    js获取屏幕(设备)宽高 <script language="javascript"> var h = ""; h += " 网页可见区域 ...

  3. [HDU5528]Count a * b

    题目大意: 定义函数$f(m)=\displaystyle\sum_{a=0}^{m-1}\sum_{b=0}^{m-1}[m\nmid ab]$,$g(n)=\displaystyle\sum_{m ...

  4. 十. 图形界面(GUI)设计2.框架窗口

    窗口是GUI编程的基础,小应用程序或图形界面的应用程序的可视组件都放在窗口中,在GUI中,窗口是用户屏幕的一部分,起着在屏幕中一个小屏幕的作用.有以下三种窗口: Applet窗口:Applet类管理这 ...

  5. 集合框架(上):学生选课(collection)

    利用集合存储课程信息: 1.Course类 package com.collection; public class Course { public String id; public String ...

  6. SQLServer To MySQL 解决方案

        最近在忙一个项目,就不详写了.过两天不忙了把项目总结一下.   思路: Access作为桥梁   1.SQLServer To Access 2007 在access里直接导入 2.Use t ...

  7. NSPredicate 条件查询或过虑

    NSPredicate用于查询和过滤 在SQL中作为查询条件通常用WHERE,但在COREDATA中作为查询条件就可以用到NSPredicate. NSPredicate 不单可以和COREDATA中 ...

  8. pycharm批量清楚pyc、$py.class文件

    By default, the .pyc and $py.class files are ignored, and thus are not visible in the Project tool w ...

  9. leetcode题解:Search for a Range (已排序数组范围查找)

    题目: Given a sorted array of integers, find the starting and ending position of a given target value. ...

  10. IDETalk

    IDETalk插件下载地址 IDETalk是由JetBrains的工程师开发的一款代码级的协同工具,主要是为一个团队在进行相关项目开发时提供代码协同.当前IDETalk只能运行在IDEA下,你可以通过 ...