Git修改远程仓库地址

2019-09-26  本文已影响0人  毛不翼

git修改远程仓库地址有三个方法

git remote set-url origin [url]

git remote set-url origin https://github.com/GoWith/apiCheck.git
git remote rm origin
git remote add origin [url]

git remote rm origin
git remote add origin https://github.com/GoWith/apiCheck.git
vim config

[core]
  repositoryformatversion = 0
  filemode = true
  logallrefupdates = true
  precomposeunicode = true

[remote "origin"]
  # 修改成新的仓库地址
  url = https://github.com/GoWith/apiCheck.git
  fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]
  remote = origin
  merge = refs/heads/master
上一篇 下一篇

猜你喜欢

热点阅读