首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何解决git状态“未合并的路径:”?

如何解决git状态“未合并的路径:”?
EN

Stack Overflow用户
提问于 2010-07-09 03:06:07
回答 2查看 178.4K关注 0票数 102

我将分支dog合并到了animal中。当我去提交时,我得到了以下信息:

代码语言:javascript
复制
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution
both deleted:       ../public/images/originals/dog.ai
added by them:      ../public/images/original_files/dog.ai

我在每个分支中都有不同的目录名和文件名。animal分支具有我想要的更改。

当我去重置头部时,它不工作。当我执行任何其他git操作(移除、签出等)时,我得到一个path not found错误。

我需要执行什么命令来解决这个问题?

EN

Stack Overflow用户

回答已采纳

发布于 2010-07-09 03:18:04

你需要做的就是:

代码语言:javascript
复制
# if the file in the right place isn't already committed:
git add <path to desired file>

# remove the "both deleted" file from the index:
git rm --cached ../public/images/originals/dog.ai

# commit the merge:
git commit
票数 93
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3207029

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档