我刚刚尝试用另一个分支替换我服务器上的master
分支,因为master
被破坏了,我似乎无法解决错误......
我替换它的分支是我的最后一个工作版本。我通过从本地计算机运行以下命令来完成此操作:
git checkout lastWorkingBranch
git merge -s我们的主人
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
我尝试在我的本地机器上再次提交和推送,然后在服务器上再次运行qazxsw poi,现在得到以下消息:
U costting / views.py U tools.py由于您有未合并的文件,因此无法拉取。请在工作树中修复它们,然后根据需要使用'git add / rm'来标记分辨率,或使用'git commit -a'。根@月亮:/代码/月亮#
我不明白为什么我得到这个......?我合并并推送了所有文件 - 如何在工作树中修复它们?
你有一些未合并的文件。所以,首先做pull
或commit
文件。
stash