拉是不可能的,因为你有未合并的文件,git藏匿不起作用。不想提交 [英] Pull is not possible because you have unmerged files, git stash doesn't work. Don't want to commit

查看:2235
本文介绍了拉是不可能的,因为你有未合并的文件,git藏匿不起作用。不想提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想拉。我改变了无视,我的Gemfile和Gemlock文件,我很乐意覆盖他们,只是拉。我试着把变化放在一边,这对我没有帮助。

  git pull 
M Gemfile
U Gemfile.lock
Pull是不可能的,因为你有没有合并的文件。
请将它们修复到工作树中,然后根据需要使用'git add / rm '
来标记分辨率,或使用'git commit -a'。
〜/ projects / sms / apps2 / apps2_admin(apps2)$ git stash savesaved
Gemfile.lock:需要合并
Gemfile.lock:需要合并
Gemfile.lock :unmerged(4ea16799dba7bfe1db28adecf36dee1af5195c1a)
Gemfile.lock:unmerged(e77439c9f86d1d0eda7ae0787e3e158f90959e68)
Gemfile.lock:unmerged(d690d3860db1aa8e46c1bb2f4de3e52a297b5c26)
致命错误:git-write-tree:错误构建树
无法保存当前的索引状态
〜/ projects / sms / apps2 / apps2_admin(apps2)$ git pull
M Gemfile
U Gemfile.lock
由于您有未合并文件。
请将它们修复到工作树中,然后根据需要使用'git add / rm '
来标记分辨率,或使用'git commit -a'。


解决方案

您可以使用 git checkout < file>< / code>检出文件的提交版本(因此放弃更改)或 git reset --hard HEAD 所有文件的任何未提交更改。


I just want to pull. I have changes to disregard, my Gemfile and Gemlock files and I'd be happy to just overwrite them and just pull. I tried stashing my changes away, this didn't work out for me. What do I do?

git pull
M   Gemfile
U   Gemfile.lock
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'.
~/projects/sms/apps2/apps2_admin(apps2)$ git stash save "saved"
Gemfile.lock: needs merge
Gemfile.lock: needs merge
Gemfile.lock: unmerged (4ea16799dba7bfe1db28adecf36dee1af5195c1a)
Gemfile.lock: unmerged (e77439c9f86d1d0eda7ae0787e3e158f90959e68)
Gemfile.lock: unmerged (d690d3860db1aa8e46c1bb2f4de3e52a297b5c26)
fatal: git-write-tree: error building trees
Cannot save the current index state
~/projects/sms/apps2/apps2_admin(apps2)$ git pull
M   Gemfile
U   Gemfile.lock
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'.

解决方案

You can use git checkout <file> to check out the committed version of the file (thus discarding your changes), or git reset --hard HEAD to throw away any uncommitted changes for all files.

这篇关于拉是不可能的,因为你有未合并的文件,git藏匿不起作用。不想提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆