Git unmerged path问题 [英] Git unmerged path issue

查看:659
本文介绍了Git unmerged path问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将分支狗合并成动物。当我去提交时,我得到以下内容:

 未合并路径:
(使用git reset HEAD<文件> ...取消)
(使用git add< file> ...来标记分辨率
都被删除:../public/images/originals/dog.ai
被他们添加:../public/images/original_files/dog.ai

制作一个长话短说,我在每个分支中有不同的目录名和文件名,动物分支有我想要的改变。



当我重置头部时,当我去采取任何其他的git动作(删除,结帐等),我得到一个路径未找到错误。



我需要什么命令要执行?

解决方案

您需要做的是:

 #如果没有在
中检查到正确位置的文件git将<路径添加到所需文件>
#删除both deleted文件索引
git rm --cached ../public /images/originals/dog.ai

git commit#提交合并


I merged branch dog into animal. When I go to commit, I get the following:

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

To make a long story short, I had different directory names and file names in each branch. Animal branch has the changes that I want.

When I go to reset the head, it doesn't work. And when I go to take any other git action (remove, checkout, etc), I get a path not found error.

What commands do I need to execute?

解决方案

All you should need to do is:

# if the file in the right place isn't already checked in
git add <path to desired file>
# remove the "both deleted" file from the index
git rm --cached ../public/images/originals/dog.ai

git commit         # commit the merge

这篇关于Git unmerged path问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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