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相关推荐

  1. 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 ...

  2. 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 ...

  3. 解决no tracked branch的问题,并详说远程分支、远程跟踪分支和跟踪分支【本地分支】

    目录 问题 分支 远程分支 远程跟踪分支 跟踪分支 什么是跟踪分支 设置跟踪分支 跟踪分支的作用 iss53分支 master分支 serverfix分支 testing分支 定位问题 解决问题 问题 ...

  4. Git master branch has no upstream branch的解决

    Git master branch has no upstream branch的解决 在push代码时,出现"git master branch has no upstream branc ...

  5. 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 ...

  6. git cherry-pick branch 与 git rebase branch 的区别

    背景: 一直以为 git cherry-pick <branchname> 与 git rebase <branchname>是一样效果.今天在使用 cherry-pick & ...

  7. [git] your branch is ahead of ... 解决办法

    [git] your branch is ahead of ... 解决办法 出现该问题表示在次之前已经有X个commite了,执行命令 git reset --hard HEAD~X 解决其中X表示 ...

  8. [已解决]Can't update: no tracked branch

    报错:Can't update: no tracked branch 我们之前的分支是drome,然后删除了这个分支,换到了另一个分支上面去了,所以出现了这个问题. 解决办法: 0:点击VCS-> ...

  9. Git创建branch 与 解决分支冲突

    由于之前写一个Spring项目的时候是自己和一位大佬一起协作的,在中间差点因为我的git命令不熟悉而导致我的本地分支错误合并.这里仔细写一下git创建分支时候的一些坑和解决分支冲突时候的一些方法. 先 ...

  10. git Your branch and xxx have diverged

    git Your branch and 'origin/aaaaa_test' have diverged Git 冲突解决办法: 查看与哪个版本冲突 $git cherry origin/aaaaa ...

最新文章

  1. Android Gradle 学习笔记(四):Gradle 构建脚本
  2. 获取某一日期为当年的第几旬
  3. 第三章 安装apache
  4. 2022年4月8日体检
  5. PCB-电解电容的封装
  6. pip install scrpy 报错: command 'gcc' failed with exit status 1
  7. ubuntu 10.10 添加系统调用的方法
  8. @ResponseStatus
  9. kubernetes service的作用、类型、关系和工作原理ClusterIp、NodePort、LoadBalance、ExternalName
  10. LayaAir 音乐与音效
  11. C/C++[codeup 1941]新版A+B
  12. wps如何用循环函数_wps表格函数怎么用 wps表格函数的简单用法分享
  13. HTML页面楷体gb2312字体,楷体gb2312
  14. Android主题和样式
  15. 结合百度搜索引擎SEO优化指南揭密百度SEO建议
  16. 教你如何使用 Python 将 pdf 文档进行 加密 解密——python实用小技能分享
  17. 自定义函数fac1用递推方法求n!,自定义函数fac2用递归方法求n!,主函数中输入整数n(0≦n≦10)后,分别调用函数fac1和函数fac2求n!,最后输出调用的结果值进行对比。
  18. 手机红米5android7.11,这些是不支持ANDROID 11更新的小米和红米手机
  19. nodejs负载均衡(一):服务负载均衡
  20. MySql.Data.dll 适配.NET 4.0的版本免费下载) 网上找了很久都是要收费的,最后github下载的,链接如下: https://github.com/BingFengHung/MyS

热门文章

  1. 未来教育计算机题库三合一,未来教育-全国计算机等级考试真考题库、高频考点、模拟考场三合一(二级MS Office高级应用)...
  2. CSS实现单行、多行文本溢出显示省略号(…)
  3. 【frida】lxhToolHTTPDecrypt安装使用问题
  4. ThinkPHP在前台模板格式化输出时间
  5. pdf文件过大如何缩小但保证清晰度
  6. 一年代码功能点的创新性怎么写_项目创新点怎么写
  7. openstack安装文档
  8. keepalived高可用
  9. 《你要如何衡量你的人生》书籍读后感
  10. ParkingEE智能化停车服务平台