我有一個git問題,我想將分支合併到主服務器中,但拒絕合併,因爲它認爲我對文件進行了本地更改。執行狀態顯示沒有變化,並且區分文件不會產生任何結果。這裏的終端輸出:Git拒絕合併,因爲對未更改文件的更改
$ 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'文件中? – 2013-03-01 19:18:36
[此答案](http://stackoverflow.com/a/12167041/166732)中的配置選項有幫助嗎? – asm 2013-03-01 19:20:13
嗨安德魯,設置'core.trustctime'爲false似乎已經做到了。感謝您指點我正確的方向:) – 2013-03-04 15:03:11