报错:
There is no tracking information for the current branch.

Please specify which branch you want to merge with.

See git-pull() for details

git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/<branch>

是因为本地分支和远程分支没有建立联系 (使用git branch -vv 可以查看本地分支和远程分支的关联关系) .根据命令行提示只需要执行以下命令即可

git branch --set-upstream-to=origin/远程分支的名字  本地分支的名字
即,解决方法:
git branch –set-upstream-to=origin/new new

git branch –set–upstream new origin/new

  (new为新建分支名)

-----------------------这样在我们每次想push或者pull的时候,只需要 输入git push 或者git pull即可

否则的话, 你必须每次都这样做:

在此之前,我们必须要指定想要push或者pull的远程分支。

git push origin new
git pull origin new

so, 增加你本地的文件并提交,可以这样

  1. git add.
  2. git commit -m "first time add project"
  3. git push

参考:

http://blog.csdn.net/zaijzhgh/article/details/38852323

----------------------------------------------------

ps:

  • If the local branch is created in your local machine, then when you push to the remote, you could use -u/--set-upstream option when you do git push.

   解决方法:git push -u origin master

  • If the branch is checked out from a remote branch, then you could use --track option when you do git checkout.

  To fix this(set a remote tracking branch), just do what git tell you:

  git branch --set-upstream-to=origin/<branch> my_branch

git pull报错:There is no tracking information for the current branch的更多相关文章

  1. git 报错 gitThere is no tracking information for the current branch. Please specify which branch you w

    新建本地分支后将本地分支推送到远程库, 使用git pull 或者 git push 的时候报错gitThere is no tracking information for the current ...

  2. git pull出现There is no tracking information for the current branch

    使用git pull 或者 git push 的时候报错 gitThere is no tracking information for the current branch. Please spec ...

  3. vscode安装dlv插件报错:There is no tracking information for the current branch.

    vscode安装dlv插件报错:There is no tracking information for the current branch. https://blog.csdn.net/a7859 ...

  4. git pull 提示 There is no tracking information for the current branch

    在执行git pull的时候,提示当前branch没有跟踪信息: git pull There is no tracking information for the current branch. P ...

  5. git遇到的问题 .Git: There is no tracking information for the current branch.

    1.Git: There is no tracking information for the current branch. 在执行git pull的时候,提示当前branch没有跟踪信息: git ...

  6. Git Error:There is no tracking information for the current branch.

    在执行git pull的时候,提示当前branch没有跟踪信息: $> git pull There is no tracking information for the current bra ...

  7. Git出现There is no tracking information for the current branch提示的解决办法

    参考:https://blog.csdn.net/sinat_36246371/article/details/79738782 在执行git pull的时候,提示当前branch没有跟踪信息: Th ...

  8. There is no tracking information for the current branch

    There is no tracking information for the current branch. Please specify which branch you want to mer ...

  9. 更新GitHub项目出现There is no tracking information for the current branch. Please specify which branch you want to merge with. 怎么解决

    git pull命令用于从另一个存储库或本地分支获取并集成(整合).git pull命令的作用是:取回远程主机某个分支的更新,再与本地的指定分支合并,它的完整格式稍稍有点复杂. 如果当前分支只有一个追 ...

随机推荐

  1. 解决chrome和firefox flash不透明的方法

    透明flash在IE内核的浏览器下正常.在chrome和火狐下不透明了. 解决方法: <object height="377" width="712" c ...

  2. android 中的 Handler 线程间通信

    一. 在MainActivity中为什么只是类似的写一行如下代码就可以使用handler了呢? Handler handler = new Handler() { @Override public v ...

  3. java 解析webservice 中的soapheader

    //从MessageContet中获取头域中的值 public HeaderBean getBeanFromRequest(org.apache.axis2.context.MessageContex ...

  4. Hibernate 操作 oracle数据库,报错总结

    1.ORA-00957: 重复的列名 错误信息如下: Hibernate: insert into T_RESOURCE (NAME, NUM, PARENT_FLAG, PARENT_ID, id, ...

  5. ss - float浮动模块的高度问题 解决方案

    当一个Div中的子元素都是浮动元素时,该div是没有高度的.通常会带来很多困扰,解决方案如下: 低版本统配兼容: overflow: hidden; 下面是不支持低配浏览器,而且似乎该效果对 P 标签 ...

  6. mysql数据库中不能插入0000-00-00 00:00:00日期数据(报错Invalid datetime format: 1292 Incorrect datetime value: '0000-00-00 00:00:00')

    报错信息 SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '0000-00-00 00:00:00' ...

  7. MSBuild入门(续)

    MSBuild基本概念(续) 在上一篇简单的介绍了下MSBuild中的四个基本块,每块介绍比较单薄,在这里对在大多数的项目模版生成的*.*proj文件中比较常见一些用法和概念做些补充.主要有一下几方面 ...

  8. 查询清除SQL Server数据库备份还原历史记录

    曾经遇到过一个用户MSDB数据库非常大,让我帮忙查查是什么原因.使用sp_spaceused找出了所有表的数据大小,发现问题是SQL Server备份和还原历史表数据太大.用户经常会做日志备份,但是从 ...

  9. 生成ID模板:年月日时分秒+6位自增码

    因为生成订单ID.商品ID 或者什么什么ID的,不想用自增,又怕反复,于是就用  年与日时分秒 + 6位自增码 (共计20位长度)来当作ID 注意:假设你的ID是Long型.就要注意,Long的最大长 ...

  10. Scala具体解释---------控制结构和函数

    条件表达式: Scala的if else语法结构和Java的一样.只是,Scala的if else表达式有值.这个值就是跟在if或者else后面的表达式的值. 比如: if(x>0) 0 els ...