Android Studio 提交项目到新的Git地址 怎么修改
2017年09月16日 15:33:34 娃哈哈19910206 阅读数:5087
原文地址:http://blog.youkuaiyun.com/sunsteam/article/details/73478045
方法有三种:
1.修改命令
git remote set-url origin [url]
例如:Git remote set-url origin gitlab@gitlab.chumob.com:PHP/hasoffer.git
2.先删后加
git remote rm origin
git remote add origin [url]
3.直接修改config文件
-
[core]
-
repositoryformatversion = 0
-
filemode = false
-
bare = false
-
logallrefupdates = true
-
symlinks = false
-
ignorecase = true
-
[remote "origin"]
-
url = https://github.com/sunsteam/android-zxingLibrary.git
-
fetch = +refs/heads/*:refs/remotes/origin/*
-
[branch "master"]
-
remote = origin
-
merge = refs/heads/master