git分支管理

git分支建立,切换,查看,删除

常用指令如下

https://www.runoob.com/git/git-branch.html

git checkout -b test1 #建立新分支test1,并切换到上面

git checkout  test1 #切换到分支test1

git branch #查看本地分支

git branch -a #查看所有分支

git branch -d test1 #删掉分支test1

git branch -D test #强制删除分支test1

git合并

合并历程和原理

https://git-scm.com/book/zh/v2/Git-%E5%88%86%E6%94%AF-%E5%88%86%E6%94%AF%E7%9A%84%E6%96%B0%E5%BB%BA%E4%B8%8E%E5%90%88%E5%B9%B6

git分支的讲解视频

讲解视频在仓库>git>git分支与合并

https://github.com/mocas-usr/document.git

git远程常用的分支操作

使用git remote -v,查看clone地址

git branch -a 查看所有分支,包括远程的

git remote add origin  ssh(http:/)将本地所在分支推送到github上

git remote add [name] [url]
示例:git remote add practice https://github.com/pzq-pzq/practice.git
说明:上述中的name与erl一一匹配,将name作为连接的标识

修改可采用先删除后添加
删除远程仓库git remote rm [name]
示例:git remote rm practice

推送到特定的远程仓库

git push [remote] [branch]
示例:git push practice [暂空]
说明:这样每次输入不同的remote,便可上传到不同的远程仓库

获取远程仓库的内容

git pull [remote] [branch]
示例:git pull practice [暂空]
说明:获取name为practice的远程仓库的内容

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值