停止修改codeStyleSettings.xml的IntelliJ [英] Stop IntelliJ from modifying codeStyleSettings.xml

查看:168
本文介绍了停止修改codeStyleSettings.xml的IntelliJ的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在版本控制(git)中使用了我们的codeStyleSettings.xml,以便在整个工程组织中标准化代码风格,就像这些 问题。但是,我们仍然遇到IntelliJ(或插件)会更改codeStyleSettings.xml文件的问题,有时开发人员会意外检查更改。

We have our codeStyleSettings.xml in version control (git) in order to standardize code style across the engineering org, just like in these questions. However, we keep running into the issue where IntelliJ (or a plugin) would change the codeStyleSettings.xml file and sometimes the developer would accidentally check in the changes.

我试过类似于 git update-index --skip-worktree [< file> ...] ,它解决了大多数情况下的问题,除了当远程发生上游更改时发生冲突(因为文件的本地版本发生更改,但由于 --skip-worktree 命令,实际上不会显示在 git status 上。)

I've tried things like git update-index --skip-worktree [<file>...], which solves the problem for most cases, except for when an upstream change comes in from the remote, and a conflict occurs (because there's a change in the local version of the file, but because of the --skip-worktree command, won't actually show up on a git status.)

防止IntelliJ对这个文件进行自动更改似乎是最好的行动方式(如果可能的话),但有没有其他方法?我试图让开发团队尽可能无痛苦。现在,团队分为IntelliJ 14和15。

Preventing IntelliJ from making automatic changes to this file seems like the best course of action (if even possible), but is there another way? I'm trying to make it as painless for the development team as possible. The team is split between IntelliJ 14 and 15 for now.

推荐答案

有一个配置服务器插件 https://www.jetbrains.com/help/idea/2016.1/synchronizing-and-sharing-settings.html?origin= old_help

There is a configuration server plugin https://www.jetbrains.com/help/idea/2016.1/synchronizing-and-sharing-settings.html?origin=old_help

我们在我们公司使用这个。它工作正常,但仍需要一些改进。您可以将存储库设置为只读,以便人们无法更改其他用户的代码风格。

We are using this in our company. It works fine, but still needs some improvement. You can set the repository read-only so the people can't change the codestyles for other users.

这篇关于停止修改codeStyleSettings.xml的IntelliJ的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆