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命令的作用是:取回远程主机某个分支的更新,再与本地的指定分支合并,它的完整格式稍稍有点复杂. 如果当前分支只有一个追 ...
随机推荐
- Android 4.4KitKat Sound System
Alsa Lib: File path:external/tinyalsa Audio Hal Library: Core File path:hardware/libhardware_legacy/ ...
- c# 读取文件流
1.获取文件路径 2.编写读取路径文件信息 private string ReadFileStream(string filePath) { string st ...
- JUC组件扩展(二)-JAVA并行框架Fork/Join(二):同步和异步
在Fork/Join框架中,提交任务的时候,有同步和异步两种方式. invokeAll()的方法是同步的,也就是任务提交后,这个方法不会返回直到所有的任务都处理完了. fork方法是异步的.也就是你提 ...
- Spring Boot(三):logback打印日志
springboot对logback的支持是非常好的,不需要任何配置,只需要在resource下加logback.xml就可以实现功能直接贴代码: <?xml version="1.0 ...
- Atitit.判断汉字的编码 regedit 注册表里面的reg_sz
Atitit.判断汉字的编码 regedit 注册表里面的reg_sz 1. 可以判断出是unicode编码1 2. 有下面分割ucs2 大头小偷编码1 3. 使用小偷编码测试1 4. 注册表里面的r ...
- Linux SWAP 深度解读
概述 本文讨论的swap基于Linux4.4内核代码.Linux内存管理是一套非常复杂的系统,而swap只是其中一个很小的处理逻辑. 希望本文能让读者了解Linux对swap的使用大概是什么样子.阅读 ...
- 1.GCC编译过程
一. GCC编译过程 gcc -E hello.c -o hello.i // 预处理.将代码中包含的头文件和宏进行替换 gcc -S hello.i -o hello.s // 汇编.将当前文本转换 ...
- wxpy学习
准备工作 安装 pip install -U wxpy -i "https://pypi.doubanio.com/simple/" 通过python脚本来发送消息给好友 from ...
- TCP编程,Socket通讯
网络编程分两种,一种是TCP编程,还有一种是UDP编程(点击打开链接).而本文先讲述简单的TCP编程,Socket套接字连接通讯,实现简单的client与server之间的信息传输. 以下是clien ...
- zend studio 10.6.2 设置默认编码为UTF-8
如果汉化的:窗体-->常规-->工作空间 然后再选择编码格式 如果未汉化:Window->Preferences->General->wookspace 然后再选 ...