查看远程仓库地址
git remote -v
方式一:命令直接修改
git remote set-url origin https://github.com/lihefei/xxx.git
方式二:命令先删除再添加
git remote rm origin
git remote add origin https://github.com/lihefei/xxx.git
方式三:修改config文件
在项目根录的.git文件夹下找到config文件,打开修改url后保存
提示:windows系统中如果找不到.git文件夹,在<文件夹选项>中勾选<显示隐藏的文件、文件夹和驱动器>项
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = https://github.com/lihefei/xxx.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
1491

被折叠的 条评论
为什么被折叠?



