错误信息:

No tracked branch configured for branch dev-link or the branch doesn't exist.
        To make your branch track a remote branch call, for example,
        git branch --set-upstream-to=origin/brank brank

场景一:

如果是创建本地分支推送到git上的场景

解决方案:

需要提交本地分支到远程仓库

1.初始化仓库:

git init

2.添加文件到本地仓库:

git add .

3.添加文件描述信息:

git commit -m "commit-message"

4. 链接远程仓库,创建分支:

git remote add origin ${branch}

5. 推送本地仓库的文件到远程仓库:

git push -u origin ${branch}

场景二:

如果在git上创建了远程分支,本地拉取或提交远程分支报错的场景

Can't Update
        No tracked branch configured for branch dev-link or the branch doesn't exist.

解决方案:

需要同步远程分支,避免冲突

1.git fetch

2.git branch --set-upstream-to=origin/${branch_name} ${branch_name}

场景三:

如果commit了代码,想要恢复提交或回滚到指定版本

git reset --hard ${branch_name}

或者

git revert  ${version}

git No tracked branch configured or branch doesn‘t exist相关推荐

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

  2. IDEA git 拉取项目时报 No tracked branch configured for branch master or the branch doesn‘t exist的提示

    1.选择本地文件位置,主项目右键 2.空白处右键,打开git的Git bash here 3.输入 命令: git branch --set-upstream-to=origin/master 4.返 ...

  3. 删远端分支报错remote refs do not exist或git: refusing to delete the current branch解决方法

    先输入: 在git 命令行终端输入 git fetch -p origin 查看所有分支: git branch -a 然后删除: git push origin -d xxxx 如果报错:git: ...

  4. git pull命令操作 git pull <remote> <branch>

    git pull命令操作 git pull <remote> <branch> git pull <remote> <branch> 解决1: git ...

  5. 最近使用git的错误----“failed to push some refs to ...”与“On branch master Your branch is up to date with ‘”

    第一种错误 使用命令 git push origin master 报如下错误: failed to push some refs to - 这是因为你往git上已经推送了一部分代码或文件夹,你删掉了 ...

  6. git远程操作报错git branch --set-upstream-to=origin/branch master

    报错信息如下 There is no tracking information for the current branch. Please specify which branch you want ...

  7. 提交代码遇到 Everything up-to-date 或 提交代码遇到 On branch master Your branch and ‘origin/master‘ have diverg

    提交代码遇到 Everything up-to-date 提交代码遇到『Everything up-to-date』 提交代码遇到 On branch master Your branch and ' ...

  8. git 移动分支指针_git 分支( branch ) 的基本使用

    分支( branches ) 是指在开发主线中分离出来,做进一步开发而不影响到原来主线. Git 存储的不是一系列的更改集( changeset ),而是一系列快照.当你执行一次 commit 时, ...

  9. Git异常:Cannot delete the branch 'test1' which you are currently on

    GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ---------------------------------------- ...

最新文章

  1. 工业根基,莫让ICT喧宾夺主
  2. Axure RP Extension for Chrome安装
  3. 性能领先,即训即用,快速部署,飞桨首次揭秘服务器端推理库
  4. flashback table肯定会造成rowid跟着修改
  5. 有网友提问,关于本地XML转JSON的小工具
  6. python complex函数def_【Python3】Python函数
  7. php增加mysql索引_mysql怎么添加索引
  8. 《剑指Offer》 二叉树的镜像
  9. nginx server_name
  10. Bootstrap3.0入门学习系列规划[持续更新]
  11. 14.bash(2) 与 环境变量
  12. 零基础学UI设计教程之图标的设计形式讲解
  13. arcmap操作Excel文件没有注册类解决办法
  14. 计算机组成原理实验二八位寄存器,计算机组成原理课后参考答案
  15. python实现归结演绎推理_归结演绎推理.ppt
  16. 关于zblog模板当中标签、相关文章调用应该怎么来写
  17. Blender插件安装不显示问题
  18. Selenium基于Python web自动化测试框架 —— PO模型
  19. 数据中台技术架构方案
  20. class com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 recipient is not exist

热门文章

  1. java 并发(并发工具包)
  2. Janus的STUN原理与抓包分析
  3. win10系统由于服务器出错翻译失败,win10系统下谷歌浏览器翻译失败怎么办
  4. matlab unifit,【matlab】matlab在概率统计中的应用(二)
  5. 均衡负载集群(LBC)-1
  6. java凑数问题,包子凑数——Java
  7. Python .csv转Excle数据(csv数据为空格分割)
  8. 最新多线程图解韩顺平老师2021
  9. 史上最详细Mysql免安装版教程
  10. 在Eclipse MarketPlace网页中安装插件显示Eclipse:Drag to Install!