git pull报错: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 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, 增加你本地的文件并提交,可以这样
- git add.
- git commit -m "first time add project"
- 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-upstreamoption when you dogit push.
解决方法:git push -u origin master
- If the branch is checked out from a remote branch, then you could use
--trackoption when you dogit 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的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- Git出现There is no tracking information for the current branch提示的解决办法
参考:https://blog.csdn.net/sinat_36246371/article/details/79738782 在执行git pull的时候,提示当前branch没有跟踪信息: Th ...
- 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 ...
- 更新GitHub项目出现There is no tracking information for the current branch. Please specify which branch you want to merge with. 怎么解决
git pull命令用于从另一个存储库或本地分支获取并集成(整合).git pull命令的作用是:取回远程主机某个分支的更新,再与本地的指定分支合并,它的完整格式稍稍有点复杂. 如果当前分支只有一个追 ...
随机推荐
- C# EF更新当前实体报错 ObjectManager无法管理具有相同键值的多个对象
原因: ObjectManager已经在跟踪此对象 更新实体前判断 if (db.Entry<T>(t).State != EntityState.Modified) db.Entry&l ...
- android 签名、混淆打包
1.android 签名 使用eclipse导出带签名的apk,最简单的方式. 最后一步finish ,就能导出一个xxx.keystore的文件了. 下次再发布新版本的时候,使用这个生成的签名继续使 ...
- 英文版windows乱码问题(win7/8/10)
- mysql-ubuntu14.04彻底卸载mysql
删除mysql的数据文件 sudo rm /var/lib/mysql/ -R 删除mysql的配置文件 sudo rm /etc/mysql/ -R 自动卸载mysql(包括server和clien ...
- C#通过WIN32 API实现嵌入程序窗体
本文实例讲述了C#通过WIN32 API实现嵌入程序窗体的方法,分享给大家供大家参考.具体如下: 这是一个不使用COM,而是通过WIN32 API实现的示例, 它把写字板程序嵌在了自己的一个面板中. ...
- 多线程-Thread与Runnable源码分析
Runnable: @FunctionalInterface public interface Runnable { /** * When an object implementing interfa ...
- (4)Smali系列学习之Smali语法详解内部类
在这一节,我们来介绍一下内部类.对于Java文件中的每一个内部类,都会产生一个单独的smali文件,比如ActivityThread$1.smali.这些文件的命名规范是如果是匿名内部类,则命名规则是 ...
- Binary Tree Postorder Traversal --leetcode
原题链接:https://oj.leetcode.com/problems/binary-tree-postorder-traversal/ 题目大意:后序遍历二叉树 解题思路:后序遍历二叉树的步骤: ...
- matplotlib之极坐标系的极角网格线(thetagrids)的显示刻度
极坐标系的极角网格线(thetagrids)的显示刻度 #!/usr/bin/env python3 #-*- coding:utf-8 -*- ########################### ...
- 蓝牙(CoreBluetooth)-中心设备(客户端)
蓝牙(CoreBluetooth)-中心设备(客户端) 蓝牙客户端-中心设备 主要内容 1. 创建`中央管理器` 2. 发现并且连接外设 3. 寻找连接上的外设数据 4. 发送读或写`特征值`的请求 ...