git查看、添加、删除远程地址

远程 添加 查看 删除 git 地址 多个 url githubcom zhufenghua1998 编程技术
发布日期 2022-10-22 更新日期 2022-10-22 阅读次数 81 文章字数 385

查看所有的远程

git remote -v

删除origin

git remote rm origin

添加origin

git remote add origin git@github.com:zhufenghua1998/bp3.git

fetch远程分支

git fetch

把本地分支和远程分支关联起来

git branch --set-upstream-to=origin/remote_name local_name

注意:多个 origin ,需要多次推送,如果希望一个 fetch ,多个 push【一次】,则在添加一个 origin 后,设置多个 url,例如:

git remote set-url --add origin git@github.com:zhufenghua1998/bp3.git

如果不再需要多个 url ,则

git remote set-url --delete origin git@github.com:zhufenghua1998/bp3.git


文章作者: 朱丰华

文章链接: https://smart.52dixiaowo.com/blog/post-144.html

版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。

远程 添加 查看 删除 git 地址 多个 url githubcom zhufenghua1998

发表评论

相关推荐
朱丰华   |   3周前   |   对象 · 属性 · 反射 · js

js 对象反射 Reflect

38    评论    点赞
朱丰华   |   1个月前   |   启动 · php

debian12开机启动sh

76    评论    点赞
朱丰华   |   10个月前   |   git

git从缓存中移除数据git rm --cached

464    评论    点赞
朱丰华   |   1年前   |   linux · upx

Linux下安装UPX

520    评论    点赞
朱丰华   |   1年前   |   git

git push -u参数是什么意思?--set-upstream

316    评论    点赞
朱丰华   |   1年前   |   git · hub · 仓库

go克隆并引用github仓库

177    评论    点赞
朱丰华   |   1年前   |   php · 缓存 · opcache

php 加速、提高并发opcache

253    评论    点赞
朱丰华   |   1年前   |   js · 重复

js如何避免重复监听addEventListener事件?

181    评论    点赞
朱丰华   |   1年前   |   go · gopath

Go自定义包并安装(GOPATH)

146    评论    点赞
朱丰华   |   1年前   |   mysql · 变量 · sql

MySQL实现行号-自定义变量

141    评论    点赞
朱丰华   |   1年前   |   sed · 文件

Shell 指定行处理head、tail、sed

181    评论    点赞
朱丰华   |   1年前   |   linux · 内容

linux环境下,对于一个大文件,如何查看其中某行的内容

93    评论    点赞
朱丰华   |   1年前   |   文件 · linux · 修改

linux文件的三个时间atime,mtime,ctime分别表示什么?

327    评论    点赞
朱丰华   |   1年前   |   linux · 文件

linux递归统计文件夹大小、du命令_Linux du命令:查看文件夹和文件的磁盘占用情况

237    评论    点赞
朱丰华   |   1年前   |   git · add · 文件

git add -A 和 git add . 的区别

134    评论    点赞
朱丰华   |   1年前   |   php

windows下编写、编译php扩展

197    评论    点赞
朱丰华   |   1年前   |   linux · php

linux下编写、编译php扩展

175    评论    点赞
朱丰华   |   1年前   |   html

npm clean-mark,抓取网页文章内容,转换成markdown、html、txt

216    评论    点赞
朱丰华   |   1年前   |   js · export · import

js es6 export,import,export default的用法和区别

152    评论    点赞
朱丰华   |   1年前   |   js · vue · 监听

js vue监听,深度监听

135    评论    点赞
{{item.author_name}}   |   {{new Date(item.date*1000).log()}}   |   {{it}} ·

{{item.title}}

{{item.uv}}    评论    点赞