How to stop AndroidStudio from overwriting .idea/codeStyles/Project.xml : <p>In our project, we have committed .idea/codeStyles/Project.xml to source control with the goal of enforcing a common style among all contributors to the project without affecting the style of other projects.  </p>

<p>However, Android Studio appears to be making unwanted changes to this file.  </p>

<p>Pulling down the latest code from git and then simply opening Android Studio and then checking <code>git status</code> produces:</p>

<pre><code>Changes not staged for commit:
  (use "git add &lt;file&gt;..." to update what will be committed)
  (use "git checkout -- &lt;file&gt;..." to discard changes in working directory)

        modified:   my-project/.idea/codeStyles/Project.xml

no changes added to commit (use "git add" and/or "git commit -a")
</code></pre>

<p>The changes it is making look like this:
<a href="https://i.stack.imgur.com/kpfnk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kpfnk.png" alt="enter image description here"></a></p>

<p>As you can see it is removing some XML-formatting settings.  </p>

<p>I am running Android Studio 3.5, but I can't guarantee that everyone else is, and we would like to keep the project agnostic with respect to IDE-version.  </p>

<p>Is there a way to prevent Android Studio from changing these settings?  Is there a more recommended way to achieve uniform code-style?</p>
