当我尝试在终端中拉入我的项目目录时,我看到以下错误:
harsukh@harsukh-desktop:~/Sites/branch1$ git pull origin master
U app/config/app.php
U app/config/database.php
U app/routes.php
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
为什么git说"Pull is not possible because you have unmerged files",我该如何解决?
我正在与另外 1 名开发人员合作,他创建了一个需要与 master 合并的分支。
尝试将 Visual Studio Community(而不是 Visual Studio Code)中的 Git 拉入 Bitbucket 存储库时出现此错误
如果我尝试推送,它会显示“无法推送,因为您的本地分支位于远程分支后面”。
这是错误:
Hint: You have divergent branches and need to specify how to reconcile them.
Hint: You can do so by running one of the following commands sometime before
Hint: your next pull:
Hint: 
Hint:   git config pull.rebase false  # merge
Hint:   git config pull.rebase true   # rebase
Hint:   git config pull.ff only       # fast-forward only
Hint: 
Hint: You can replace "git config" with …我正在开发一个Git分支,它有一些破坏的测试,我想从另一个已经修复的分支中提取(合并更改,而不仅仅是覆盖)这些测试.
我知道我能做到
git pull origin that_other_branch
但这将尝试合并许多其他文件,因为我尚未准备好.
是否可以从另一个分支中提取和合并指定的文件(而不是所有内容)?
这不仅仅是对一个文件的Git pull请求的重复,因为该问题的所有答案都是如何将本地更改的文件还原到存储库版本,而不更改任何分支.
我正在学习git,而且我正在关注Git社区书籍.
以前(很久以前)我在Github上创建了一个公共存储库,包含一些文件.现在我在当前的计算机上设置了一个本地Git存储库,并提交了一些文件.然后我添加了一个指向我的Github页面的遥控器:
[root@osboxes c]# git remote add learnc https://github.com/michaelklachko/Learning-C
这似乎是成功的:
[root@osboxes c]# git remote show learnc
* remote learnc
  Fetch URL: https://github.com/michaelklachko/Learning-C
  Push  URL: https://github.com/michaelklachko/Learning-C
  HEAD branch: master
  Remote branch:
    master tracked
  Local ref configured for 'git push':
    master pushes to master (local out of date)
现在我想从我的Github repo下载文件到我的电脑.我这样做了:
[root@osboxes c]# git fetch learnc
[root@osboxes c]# git merge learnc/master
warning: refname 'learnc/master' is ambiguous.
Already up-to-date.
但是,我在本地目录中看不到任何新文件.我怎么能得到它们?
我也试过这样做:
[root@osboxes c]# git pull learnc master
From https://github.com/michaelklachko/Learning-C
 * branch            master     -> FETCH_HEAD …最近,在任何之后git pull,git开始产生我的文本编辑器,并要求合并提交消息.提交消息已经预先填充,我只需要保存并关闭窗口以完成提取.
在过去,它将使用标准提交消息(沿着行Merge branch 'dev' of remote.com:/repo into dev)静默地进行合并.
我最近更新了git到版本1.7.11.3(通过自制程序),但我想不出我可能做了什么来改变这种行为.这是一个设置,还是有其他方式回到它的方式?
我克隆了一个git存储库,然后签出了一个标签:
# git checkout 2.4.33 -b my_branch
这没关系,但是当我尝试git pull在我的分支中运行时,git会吐出这个错误:
当前分支没有跟踪信息.请指定要合并的分支.有关详细信息,请参阅git-pull(1)
Run Code Online (Sandbox Code Playgroud)git pull <remote> <branch>如果您希望为此分支设置跟踪信息,可以使用以下命令:
Run Code Online (Sandbox Code Playgroud)git branch --set-upstream new origin/<branch>
我想git pull只更新主分支并保留当前分支(无论如何它都是标记).这样的事情可能吗?
我需要这个的原因是我有一个自动脚本,总是git拉存储库,当然因为上面的错误而失败..
我向项目报告了一个问题.现在所有者将状态更改为已关闭,但如何将其更改为再次打开?
我在某处读到了我需要推拉操作的权利.真的吗 ?
TL; DR:我有一个"跟踪"的分支,我不能拉.
所以我在这里"斗4":
$ git branch -v
  bucket-1       410f7b5 * gh-53 * gh-48 * "Share App"
  bucket-2       7ed70a2 * upgrade to SOLR 3.3.0
  bucket-3       400ffe4 * emergency fix prod issue
* bucket-4       64c2414 Merge branch 'bucket-3' into bucket-4
  master         8dc4854 [ahead 1] * gh-73
我想从我的遥控器中提取更改:
$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.bucket-4.merge' in
your configuration file does not tell me, either. Please
specify which branch you want …在Git拉动之后,其输出给出了变化量的摘要.
如何查看每个或部分文件的详细更改?
好的,这是我对Jefromi的问题:
我如何知道自己是否想要掌握?我所做的只是"git pull".
主人指向什么,主人和HEAD,Git的两个默认头之间有什么区别?
如何查看特定文件中的详细更改?
如何git pull再次查看摘要输出中的更改?
git diff和之间有什么区别git whatchanged?
我已经在git中设置了一些远程跟踪分支,但是一旦我用'git fetch'更新它们,我似乎永远无法将它们合并到本地分支中.
例如,假设我有一个名为'an-other-branch'的远程分支.我在本地设置为跟踪分支使用
git branch --track an-other-branch origin/an-other-branch
到现在为止还挺好.但是如果该分支得到更新(通常是我移动机器并从该机器提交),并且我想在原始机器上更新它,我遇到了fetch/merge的问题:
git fetch origin an-other-branch
git merge origin/an-other-branch
每当我这样做时,我都会得到一条"已经是最新的"消息,并且没有任何合并.
但是,一个
git pull origin an-other-branch
总是像你期望的那样更新它.
另外,运行git diff
git diff origin/an-other-branch
表明存在差异,所以我认为我的语法错了.
我究竟做错了什么?
编辑[2010-04-09]:我已经检查了几次,我肯定不在另一个分支上.我的'git fetch'后跟'git merge'(如上所示)是否应该与git pull完全相同?我将得到一些显示git状态等结果的工作流程.