git常见问题之git pull时Please specify which branch you want to merge with.
2017-08-16 06:48
1256 查看
$ git pull时遇到如下提示
看到第二个提示,我们现在知道了一种解决方案。也就是指定当前工作目录工作分支,跟远程的仓库,分支之间的链接关系。<br>
比如我们设置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.
$ git pull warning: no common commits remote: Counting objects: 5, done. remote: Compressing objects: 100% (4/4), done. remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (5/5), done. From github.com:nonfuxinyang/android-study * [new branch] master -> origin/master 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-to=origin/<branch> master
看到第二个提示,我们现在知道了一种解决方案。也就是指定当前工作目录工作分支,跟远程的仓库,分支之间的链接关系。<br>
比如我们设置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.
相关文章推荐
- git常见问题之git pull origin master时fatal: refusing to merge unrelated histories
- Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge.的问题解决(Git代码冲突)
- git 报错 gitThere is no tracking information for the current branch. Please specify which branch you w
- Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge.的问题解决(Git代码冲突)
- Git 常见问题: unable to negotiate with *.*.*.*: no matching key exchange methodfound...
- 遭遇开机自检问题:If you want to install linux default partition RAID driver,please do not use OPROM creation oporation
- git常见问题之:commit your changes or stash them before you can merge
- git---如何解决git pull之后报错:Please enter a commit to explain why this merge is necessary?(merge branch)
- 转一篇blog,这个人思路蛮清晰的 [do you want to work for a company with uninvolved management and a sweatshop mentality in which you occasionally see those people superior to you?]
- Ubuntu 下安装Git时遇到的问题 - You might want to run 'apt-get -f install' to correct these
- git常见问题之git pull时Automatic merge failed; fix conflicts and then commit the result.
- git 报错 gitThere is no tracking information for the current branch. Please specify which ...
- git pull error:You are in the middle of a conflicted merge
- GIT PULL 报错 :You have not concluded your merge (MERGE_HEAD exists).
- Xcode中git的使用方法介绍与"Please tell me who you are"问题的解决方案
- git pull 时出现 error: Your local changes to the following files would be overwritten by merge的解决办法
- <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_C
- 使用git出现的“'receive.denyCurrentBranch' Configuration variable to 'refuse'”问题及解决
- skyeye-1.3.5 Configure WARNING: llvm should be 3.0 If you want to compile skyeye with other version!
- egit 出现问题 The current branch is not configured for pull No value for key branch.master.merge found i