【发布时间】:2013-02-16 08:12:18
【问题描述】:
我遇到了一个 git 问题,我想将一个分支合并到 master 中,但它拒绝合并,因为它认为我对文件进行了本地更改。执行状态显示没有任何更改,并且对文件进行差异化不会产生任何结果。这是终端输出:
$ git checkout ProductsAndContents
Switched to branch 'ProductsAndContents'
$ git status
# On branch ProductsAndContents
nothing to commit (working directory clean)
$ git checkout master
Switched to branch 'master'
$ git status
# On branch master
nothing to commit (working directory clean)
$ git merge ProductsAndContents
error: Your local changes to the following files would be overwritten by merge:
tests/unit/src/models/BrandTests.js
Please, commit your changes or stash them before you can merge.
Aborting
任何帮助或建议将不胜感激!
【问题讨论】:
-
您是否设法将该文件放入
.git/info/exclude文件或.gitignore文件中? -
this answer 中的配置选项有帮助吗?
-
嗨 Andrew,将
core.trustctime设置为 false 似乎已经做到了。感谢您为我指明正确的方向:)