PhpStorm添加[conflicted]后缀致Git仓库损坏,如何阻止?
解决PhpStorm给Git仓库文件添加[conflicted]后缀的问题
关闭自动冲突处理开关
打开PhpStorm设置(快捷键Ctrl+Alt+S或Cmd+,),找到Version Control > Git,取消勾选和「自动合并」「自动解决冲突」相关的选项(不同版本名称可能稍有不同,找带自动处理冲突描述的开关即可)。让PhpStorm忽略.git目录
两种操作方式:- 打开设置里的Appearance & Behavior > System Settings > Files and Folders,在「Ignored Files and Folders」列表中添加
.git/; - 在项目视图右键点击
.git目录,选择「Mark Directory as > Excluded」,这样PhpStorm会完全跳过对该目录下文件的自动处理。
- 打开设置里的Appearance & Behavior > System Settings > Files and Folders,在「Ignored Files and Folders」列表中添加
检查Git全局配置
打开终端执行命令git config --global merge.tool '',确保没有将PhpStorm设为默认合并工具,避免它自动介入Git的冲突处理流程。
内容的提问来源于stack exchange,提问作者Paul Preibisch
相关产品推荐
相关产品推荐

