方式1:
直接修改配置文件 vim .git/config
修改[remote “origin”]这一项里面的url值
[remote “origin”]
url = git@git.coding.net:jinhuatai/suning_lcs_h5.git
方式2:
使用命令: git remote set-url origin 远程仓库地址
可以执行 git remote –help 看看都有哪些选项:
usage: git remote [-v | –verbose]
or: git remote add [-t <branch>] [-m <master>] [-f] [–tags | –no-tags] [–mirror=<fetch|push>] <name> <url>
or: git remote rename <old> <new>
or: git remote remove <name>
or: git remote set-head <name> (-a | –auto | -d | –delete | <branch>)
or: git remote [-v | –verbose] show [-n] <name>
or: git remote prune [-n | –dry-run] <name>
or: git remote [-v | –verbose] update [-p | –prune] [(<group> | <remote>)…]
or: git remote set-branches [–add] <name> <branch>…
or: git remote get-url [–push] [–all] <name>
or: git remote set-url [–push] <name> <newurl> [<oldurl>]
or: git remote set-url –add <name> <newurl>
or: git remote set-url –delete <name> <url>