Git远程仓库地址变更本地如何修改
以项目test为例:
老地址:http://192.168.1.1:9797/john/test.git
新地址:http://git.xxx.xxx/john/test.git
远程仓库名称: origin
方法一 通过命令直接修改远程地址
进入git_test根目录
git remote 查看所有远程仓库, git remote xxx 查看指定远程仓库地址
git remote set-url origin 新地址
方法二 通过命令先删除再添加远程仓库
进入git_test根目录
git remote 查看所有远程仓库, git remote xxx 查看指定远程仓库地址
git remote rm origin
git remote add origin 新地址
方法三 直接修改配置文件
进入git_test/.git
vim config [core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
precomposeunicode = true
[remote "origin"]
url = 新地址
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master 修改 [remote “origin”]下面的url即可
方法四 通过第三方git客户端修改。
以SourceTree为例,点击 仓库 -> 仓库配置 -> 远程仓库 即可管理此项目中配置的所有远程仓库, 而且这个界面最下方还可以点击编辑配置文件,同样可以完成方法三。
Git远程仓库地址变更本地如何修改的更多相关文章
- GIT远程仓库地址变更
将VS2013的解决方案添加到GIT源代码管理后会增加.gitattributes和.gitignore 2个文件以及.git目录 设置远程地址的文件在.git目录下的config文件中 直接修改上图 ...
- 如何快速关联/修改Git远程仓库地址
如何快速关联/修改Git远程仓库地址?按照如下步骤即可快速实现关联/修改Git远程仓库地址: 删除本地仓库当前关联的无效远程地址,再为本地仓库添加新的远程仓库地址 git remote -v //查看 ...
- windows 切换git远程仓库地址后 git push 提示Authentication failed
git切换远程分支: 方法一: git remote set-url origin 你新的远程仓库地址 方法二: git remote rm origin git remote add origin ...
- 更换git远程仓库地址
通过命令直接修改远程仓库地址 git remote 查看所有远程仓库 git remote xxx 查看指定远程仓库地址 git remote set-url origin 你新的远程仓库地址 先删除 ...
- Git远程仓库地址操作
添加 git remote add test1_origin git@github.com:b84955189/test1.git test1_origin:远程地址名,这里是我自定的. git@gi ...
- git 添加第二个远程仓库地址,一次修改到处上传~
上传本机git 公钥到对应的代码托管平台 github/码云等 本地仓库执行 git remote set-url --add origin https://gitee.com/qichengTech ...
- git远程仓库、提交代码操作
初始化仓库 1.初始化 git init #或 git clone 远程仓库地址 git init 后续要添加远程仓库,git clone不需要再添加 2.连接仓库 git remote add 远程 ...
- [转]git修改远程仓库地址
原文链接:http://www.cnblogs.com/lazb/articles/5597878.html 问:Coding远程仓库地址变了,本地git仓库地址如何更新为最新地址 git修改远程仓库 ...
- git仓库迁移和更新远程仓库地址
一.git仓库迁移 1,从原仓库clone或pull到本地仓库 git clone project_name [old_remote_repository_address] 2,在新的git创建一 ...
随机推荐
- BZOJ2120 数颜色 莫队 带修莫队
原文链接https://www.cnblogs.com/zhouzhendong/p/BZOJ2120.html 题目传送门 - BZOJ2120 题意 给定一个长度为 $n$ 的序列 $a$ ,有 ...
- 011 pandas的常见操作
一:对索引进行操作 1.reindex重新索引 pandas提供了一个方法来创建一个适应新索引的新对象. Series通过调用reindex方法会根据新的索引顺序重新排序,如果新的索引中存在原索引不存 ...
- Tree Reconstruction Gym - 101911G(构造)
---恢复内容开始--- Monocarp has drawn a tree (an undirected connected acyclic graph) and then has given ea ...
- Django 学习第十天——状态保持及表单
状态保持: 1.http协议是无状态的:每次请求都是一次新的请求,不会记得之前通信的状态 2.客户端与服务器端的一次通信,就是一次会话实现状态保持的方式:在客户端或服务器端存储与会话有关的数据 3.存 ...
- linux基础 用户(组)管理
修改/etc/shadow文件 1.chage -m MINDAYS USERNAME#设置密码修改最小天数2.chage -M MAXDAYS USERNAME#设置密码修改最大天数3.chage ...
- markdown那些事儿
markdown是一种轻量标记语言,可以用多种编辑器来写markdown语法. 一.基础链接 http://www.markdown.cn/ https://zh.wikipedia.org/wiki ...
- Codeforces.1110E.Magic Stones(思路 差分)
题目链接 听dalao说很nb,做做看(然而不小心知道题解了). \(Description\) 给定长为\(n\)的序列\(A_i\)和\(B_i\).你可以进行任意多次操作,每次操作任选一个\(i ...
- jquery 1.7.2源码解析(一)总体架构
总体架构 jquery模块分类和依赖关系: 自调用匿名函数: /** * 自调用匿名函数,jquery加载完后立即被调用,用来加载各个模块 * 为什么使用自调用匿名函数: * 通过使用自调用匿名函数, ...
- SS+FinalSpeed终极教程[转]
亲测,晚高峰看YOUTUBE的720P完全不卡. 推荐使用virwire buget VPS,性价比较高,128M内存,每月500G超大流量:http://www.cnblogs.com/tuzhuk ...
- js 基本包装类型 String
为了操作基本类型值,ECMAScript提供了三个特殊的引用类型: Boolean , Number , String 举例: var s1 = "some text"; var ...