git pull push没有指定branch报错的解决方法
来源:互联网 发布:linux c mysql编程 编辑:程序博客网 时间:2024/05/29 14:28
git 执行git push 和git pull的操作时候,经常看到下面的提示:
You asked me to pull without telling me which branch you
want to merge with, and 'branch.dev.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
use something like the following in your configuration file:
[branch "dev"]
remote = <nickname>
merge = <remote-ref>
[remote "<nickname>"]
url = <url>
fetch = <refspec>
See git-config(1) for details.
在高版本的 git下面,也许会看见这样的提示:
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) 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 master origin/<branch>
看到第二个提示,我们现在知道了一种解决方案。也就是指定当前工作目录工作分支,跟远程的仓库,分支之间的链接关系。
比如我们设置master对应远程仓库的master分支
git branch --set-upstream master origin/master
这样在我们每次想push或者pull的时候,只需要 输入git push 或者git pull即可。
在此之前,我们必须要指定想要push或者pull的远程分支。
git push origin master
git pull origin master.
You asked me to pull without telling me which branch you
want to merge with, and 'branch.dev.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
use something like the following in your configuration file:
[branch "dev"]
remote = <nickname>
merge = <remote-ref>
[remote "<nickname>"]
url = <url>
fetch = <refspec>
See git-config(1) for details.
在高版本的 git下面,也许会看见这样的提示:
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) 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 master origin/<branch>
看到第二个提示,我们现在知道了一种解决方案。也就是指定当前工作目录工作分支,跟远程的仓库,分支之间的链接关系。
比如我们设置master对应远程仓库的master分支
git branch --set-upstream master origin/master
这样在我们每次想push或者pull的时候,只需要 输入git push 或者git pull即可。
在此之前,我们必须要指定想要push或者pull的远程分支。
git push origin master
git pull origin master.
0 0
- git pull push没有指定branch报错的解决方法
- git pull push没有指定branch报错的解决方法
- git pull push没有指定branch报错的解决方法
- git pull push未指定远程branch报错
- Git push报错,提示没有权限.
- git push origin master报错,解决方法
- eclipse git报错git The current branch is not configured for pull No value for key branch.master.merge
- Git push/pull的时候报403或者提交时报错:Permission to XXX.git denied to user
- eclipse git 报错:the current branch is not configured for pull No value for key branch.xxx.merge found
- git pull all branch
- git---基本操作、新建分支,合并分支branch到主干master ,git pull ,git push
- git pull报错
- git pull和git push的区别
- git push 报错"Updates were rejected because the tip of your current branch is behind"
- git push报错 refusing to update checked out branch 解决办法
- git push & git pull
- git pull git push
- git pull 报错:git
- CloudStack安装详细步骤
- 自己写的在服务器上一段重试次数的程序,对于TAIR操作需要加乐观锁版本号防止集群上数据安全
- 异常捕获
- 【Spring学习笔记】控制反转IoC
- 计算机网络笔试题 详细分析复习知识点
- git pull push没有指定branch报错的解决方法
- frameset窗框
- 线程间操作无效: 从不是创建控件“”的线程访问它
- 使用(C++库)istringstream输入(格式化)
- python时间处理函数
- ie7一下版本浏览器跳转到提示页面
- 港媒:中国看穿美国把戏 准备在南海试试手气
- MYSQL添加远程用户或允许远程访问三种方法
- Javascript模块化编程学习(一):模块的写法