简体   繁体   English

如何强制`git merge`?

[英]How to force `git merge`?

I'm experiencing the "file name too long" error described in another question . 我遇到另一个问题中所述的“文件名太长”错误。 I've already fixed the file name in a remote repo, and now I'm trying to merge in the changes from the remote that fix the name. 我已经在远程仓库中修复了文件名,现在我试图合并来自远程修复文件名的更改。 However, git won't let me merge because it thinks I have uncommitted changes (the too-long-named file it can't create). 但是,git不允许我合并,因为它认为我有未提交的更改(无法创建的名称太长的文件)。 Is there some way to force git to merge? 有什么办法可以强制git合并吗? Note that git status lists no modifications, besides printing the file name too long error, so I don't see how to satisfy git first locally. 请注意,除了打印文件名过长的错误外, git status不会进行任何修改,因此我看不到如何首先在本地满足git的要求。 In particular, git does not report the file as rm'd or missing. 特别是混帐报告文件rm'd或丢失。

我能够通过执行git reset --hard <remote>/<branch>来解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM