git tracked branch
Tracking branch
local分支track的remote分支,又称为local的upstream(上游)
create tracked branch
// 自动创建remote同名分支,并track
git checkout --track origin/serverfix// 指定local分支名字sf
git checkout -b localBranchName origin/serverfix// 更改当前local的远端分支
git branch -u origin/serverfix// 产看分支track情况(不是实时更新的,从上次更新算起(fetch、pull))
git branch -vv
实战
需求:
1. v6.6迭代,在develop分支上共享代码 (从origin仓库的develop分支检出代码)
2. 你的需求 测试Git,先在自己分支feature/v6.6_test_git上开发 (开发期间,你的分支 track 你在远端仓库 创建的分支)
3. 最后 pull request,到develop上 (这块不体现了)
// 从remote的git仓库develop分支,上检出代码
git checkout -b feature/v6.6_test_git origin/develop
// push本地到云端
git push origin feature/v6.6_test_git
// 跟踪自己push到云端的分支
git branch -u origin/feature/v6.6_test_git
// 查看track的分支
git branch -vv
view tracked branch
git fetch --all
git branch -vv
delete branch
git push origin --delete serverfix
remote不会立即删除,而是等下次清理时(git内部机制)删除
git tracked branch相关推荐
- git No tracked branch configured or branch doesn‘t exist
错误信息: No tracked branch configured for branch dev-link or the branch doesn't exist. To make ...
- No tracked branch configured for branch dev-rongtong or the branch doesn‘t exist.
No tracked branch configured for branch dev-rongtong or the branch doesn't exist. To make your branc ...
- 解决no tracked branch的问题,并详说远程分支、远程跟踪分支和跟踪分支【本地分支】
目录 问题 分支 远程分支 远程跟踪分支 跟踪分支 什么是跟踪分支 设置跟踪分支 跟踪分支的作用 iss53分支 master分支 serverfix分支 testing分支 定位问题 解决问题 问题 ...
- Git master branch has no upstream branch的解决
Git master branch has no upstream branch的解决 在push代码时,出现"git master branch has no upstream branc ...
- Git Your branch is ahead of ‘origin/master‘ by X commits解决方法
Git Your branch is ahead of 'origin/master' by X commits解决方法 参考文章: (1)Git Your branch is ahead of 'o ...
- git cherry-pick branch 与 git rebase branch 的区别
背景: 一直以为 git cherry-pick <branchname> 与 git rebase <branchname>是一样效果.今天在使用 cherry-pick & ...
- [git] your branch is ahead of ... 解决办法
[git] your branch is ahead of ... 解决办法 出现该问题表示在次之前已经有X个commite了,执行命令 git reset --hard HEAD~X 解决其中X表示 ...
- [已解决]Can't update: no tracked branch
报错:Can't update: no tracked branch 我们之前的分支是drome,然后删除了这个分支,换到了另一个分支上面去了,所以出现了这个问题. 解决办法: 0:点击VCS-> ...
- Git创建branch 与 解决分支冲突
由于之前写一个Spring项目的时候是自己和一位大佬一起协作的,在中间差点因为我的git命令不熟悉而导致我的本地分支错误合并.这里仔细写一下git创建分支时候的一些坑和解决分支冲突时候的一些方法. 先 ...
- git Your branch and xxx have diverged
git Your branch and 'origin/aaaaa_test' have diverged Git 冲突解决办法: 查看与哪个版本冲突 $git cherry origin/aaaaa ...
最新文章
- Android Gradle 学习笔记(四):Gradle 构建脚本
- 获取某一日期为当年的第几旬
- 第三章 安装apache
- 2022年4月8日体检
- PCB-电解电容的封装
- pip install scrpy 报错: command 'gcc' failed with exit status 1
- ubuntu 10.10 添加系统调用的方法
- @ResponseStatus
- kubernetes service的作用、类型、关系和工作原理ClusterIp、NodePort、LoadBalance、ExternalName
- LayaAir 音乐与音效
- C/C++[codeup 1941]新版A+B
- wps如何用循环函数_wps表格函数怎么用 wps表格函数的简单用法分享
- HTML页面楷体gb2312字体,楷体gb2312
- Android主题和样式
- 结合百度搜索引擎SEO优化指南揭密百度SEO建议
- 教你如何使用 Python 将 pdf 文档进行 加密 解密——python实用小技能分享
- 自定义函数fac1用递推方法求n!,自定义函数fac2用递归方法求n!,主函数中输入整数n(0≦n≦10)后,分别调用函数fac1和函数fac2求n!,最后输出调用的结果值进行对比。
- 手机红米5android7.11,这些是不支持ANDROID 11更新的小米和红米手机
- nodejs负载均衡(一):服务负载均衡
- MySql.Data.dll 适配.NET 4.0的版本免费下载) 网上找了很久都是要收费的,最后github下载的,链接如下: https://github.com/BingFengHung/MyS