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-upstream
option when you dogit push
.
解决方法:git push -u origin master
- If the branch is checked out from a remote branch, then you could use
--track
option 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命令的作用是:取回远程主机某个分支的更新,再与本地的指定分支合并,它的完整格式稍稍有点复杂. 如果当前分支只有一个追 ...
随机推荐
- angularJS 第一天 使用模型与控制器绑定数据
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script sr ...
- AsyncTask的原理和缺点
番外tips: 特别喜欢一句话.假设你想了解一个人.那你从他出生開始了解吧.相同的道理,想要了解AsyncTask,就从它的源代码開始吧. 进入主题前,在说一下,开发中已经非常少使用AsyncTask ...
- MVC3 模板页页预留Section
一.模板页 Razor出现后我们就可以选择不再使用asp.net master 模板页.取而代之的是cshtml razor的模板文件.用法个人认为还是和master模板页类似.但在mater模板页的 ...
- Atitit.java的浏览器插件技术 Applet japplet attilax总结
Atitit.java的浏览器插件技术 Applet japplet attilax总结 1. Applet类及各个方法说明 1 2. JApplet类示例 2 3. / 用main方法运行JAp ...
- python学习之urllib.parse.unquote()
urllib.parse.unquote(string,encoding ='utf-8',errors ='replace') 用同一个字符换成%xx转义.相当于JS中的urldecode(),对u ...
- weex-iOS集成
weex-iOS集成 weex只是刚刚起步,还存在一些bug,有些功能还有待完善和提高.但是其使用起来还是可以节省些时间. 这里我们说说如何把weex集成到我们的iOS项目中 1. 下载weex源代码 ...
- 0057 Spring MVC如何获取HTTP请求头信息--URL中的动态参数--@RequestHeader--@CookieValue--@PathVariable
获取HTTP请求头信息 一个HTTP请求除了有参数和实体内容外还有HTTP请求头信息,Spring MVC也可以获取这部分信息 @RequestHeader解可以将请求头信息映射到处理方法的形参上 @ ...
- 【持续更新】总结:C++开发时积累的一些零碎的东西
Makefile template update: 1.调整了顺序,把经常编辑的部分集中在了Makefile的下半部分 2.进行了一些重构实现更多的代码复用,见红色高亮部分,LIBPATH_ALL和L ...
- 启动项目时tomcat问题汇总
最近SVN上迁下来的新项目,在刚运行项目时tomcat就报错了.以前也经常遇到,没太引起注意,今天终于决定将这个问题好好总结一下. 首先 1.错误:An internal error occurred ...
- matlab和c++混合编程---matlab和vs的环境配置问题及方法和步骤(转载)
matlab和c++混合编程---方法和步骤 matlab和c++混合编程---matlab和vs的环境配置问题 摘要:Matlab具有很强的数值计算和分析等能力,而C/C++是目前最为流行的高级程序 ...