Git 技术篇 - git remote修改、移除仓库源的使用方法,git添加仓库源提示fatal: remote origin already exists.问题解决

简介: Git 技术篇 - git remote修改、移除仓库源的使用方法,git添加仓库源提示fatal: remote origin already exists.问题解决

     

通过 git remote remove origin 即可移除仓库源,再添加就好了。

image.png

更多使用方法可以直接通过 git remote -h 来进行查看。

$ git remote -h
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>
    -v, --verbose         be verbose; must be placed before a subcommand

喜欢的点个赞❤吧!

目录
相关文章
|
2月前
|
网络安全 开发工具 git
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
git修改提交路径以及强制提交——异常:error: remote origin already exists.与异常:error: failed to push some refs to的解决
38 0
|
2月前
|
网络安全 数据安全/隐私保护
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
105 0
|
2月前
|
开发工具 git
完美解决git 执行git push origin master指令 报错command not found
完美解决git 执行git push origin master指令 报错command not found
48 0
|
2月前
|
开发工具 git
git报错 Unable to create ‘D:/project/xxx/.git/index.lock‘: File exists.
git报错 Unable to create ‘D:/project/xxx/.git/index.lock‘: File exists.
157 1
|
2月前
|
开发工具 git
Git:error: remote origin already exists
Git:error: remote origin already exists
28 2
|
7月前
|
开发工具 git
解决:fatal: not a git repository (or any of the parent directories): .git的问题
解决:fatal: not a git repository (or any of the parent directories): .git的问题
|
2月前
|
缓存 数据可视化 网络安全
Git命令大全
Git命令大全
73 1
|
18天前
|
存储 网络安全 开发工具
【GIT】Git常用命令学习
【GIT】Git常用命令学习
27 1
|
2月前
|
Shell 网络安全 开发工具
GIT常用命令
GIT常用命令
|
1天前
|
网络安全 开发工具 数据安全/隐私保护
git 常用命令【编程必备】
git 常用命令【编程必备】
5 0