忽略对目录的所有更改

ignore all changes to dir

我们有一个 git 子模块,它位于多个存储库中名为 'config' 的文件夹中。

我在进行合并时得到这个:

On branch oleg/feature/1537299444
Your branch is up to date with 'origin/oleg/feature/1537299444'.

Changes not staged for commit:
        modified:   config (modified content)

no changes added to commit

它以 1 退出。

如何忽略 'config' 文件夹的所有更改,它是 git 子模块?

我试过了:

git checkout config

但这并没有起到任何作用

首先尝试检查您在子模块中看到的 diff/new 元素的类型。

cd config
git status
git diff

如果可以,请在该配置文件夹中执行 git reset --hard(如果您不需要在配置中进行任何本地修改)

然后返回父仓库,重试 git merge