Git 由于文件未合并,无法拉取
Git pull not possible because of unmerged files
我刚刚尝试用另一个 b运行ch 替换我服务器上的 master
b运行ch,因为 master
坏了,我不能'似乎无法解决错误...
我替换它的 b运行ch 是我拥有的最后一个工作版本。我通过 运行 从本地计算机执行以下命令来完成此操作:
git checkout lastWorkingBranch
git merge -s ours master
git checkout master
git merge lastWorkingBranch master
git push origin master
然后,在服务器上,我运行
git pull origin master
但是,这给出了以下输出:
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'.
root@moon:/code/moon# git stash
costing/views.py: needs merge
tools.py: needs merge
costing/views.py: needs merge
tools.py: needs merge
costing/views.py: unmerged (395725168ffab1962655116880b74158de3e1e56)
costing/views.py: unmerged (95ff89d4160135c2ebefd67a0fc1af2f2a0abc74)
costing/views.py: unmerged (902f9ff57c808cefd074f3ea07fb252f9eedb4e2)
tools.py: unmerged (6832dd3197f838a52396381c30ef55069e24411b)
tools.py: unmerged (24e8179f7689ffacdd50407259f3a12b3d3f609a)
tools.py: unmerged (93b3d0baa5f1b75c85120cc2e7cab7dcd949b9a5)
fatal: git-write-tree: error building trees
Cannot save the current index state
我尝试在我的本地机器上再次提交和推送,然后在服务器上再次 运行 a pull
,现在收到以下消息:
U costing/views.py
U tools.py
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm '
as appropriate to mark resolution, or use 'git commit -a'.
root@moon:/code/moon#
我不明白为什么我会收到这个...?我已经合并并推送了我的所有文件 - 如何在工作树中修复它们?
您有一些未合并的文件。因此,首先执行 commit
或 stash
文件。
$ git commit -am <message> # add and commit
$ git pull origin master # pull origin
Or,
$ git add .
$ git stash # remove the files
$ git pull origin master
我刚刚尝试用另一个 b运行ch 替换我服务器上的 master
b运行ch,因为 master
坏了,我不能'似乎无法解决错误...
我替换它的 b运行ch 是我拥有的最后一个工作版本。我通过 运行 从本地计算机执行以下命令来完成此操作:
git checkout lastWorkingBranch
git merge -s ours master
git checkout master
git merge lastWorkingBranch master
git push origin master
然后,在服务器上,我运行
git pull origin master
但是,这给出了以下输出:
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'.
root@moon:/code/moon# git stash
costing/views.py: needs merge
tools.py: needs merge
costing/views.py: needs merge
tools.py: needs merge
costing/views.py: unmerged (395725168ffab1962655116880b74158de3e1e56)
costing/views.py: unmerged (95ff89d4160135c2ebefd67a0fc1af2f2a0abc74)
costing/views.py: unmerged (902f9ff57c808cefd074f3ea07fb252f9eedb4e2)
tools.py: unmerged (6832dd3197f838a52396381c30ef55069e24411b)
tools.py: unmerged (24e8179f7689ffacdd50407259f3a12b3d3f609a)
tools.py: unmerged (93b3d0baa5f1b75c85120cc2e7cab7dcd949b9a5)
fatal: git-write-tree: error building trees
Cannot save the current index state
我尝试在我的本地机器上再次提交和推送,然后在服务器上再次 运行 a pull
,现在收到以下消息:
U costing/views.py U tools.py Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then use 'git add/rm ' as appropriate to mark resolution, or use 'git commit -a'. root@moon:/code/moon#
我不明白为什么我会收到这个...?我已经合并并推送了我的所有文件 - 如何在工作树中修复它们?
您有一些未合并的文件。因此,首先执行 commit
或 stash
文件。
$ git commit -am <message> # add and commit
$ git pull origin master # pull origin
Or,
$ git add .
$ git stash # remove the files
$ git pull origin master