How to ignore a directory from pull on remote repository
<p>We are working on a yii2 project and have a git repository. But every time each on team member pull from remote repo some files are replaced,such as common/main-local.php, common/params-local.php and all the files inside backend/runtime and debug. </p>

<p>How we prevent from rewriting these files when pulling from remote repo?</p>

<p>I look in backend/runtime and see a .gitignore file but inside it there were just to line:</p>

<pre><code>*
!.gitignore
</code></pre>

<p>there are some similar files on some other directories. I guess these ignore file will prevent from pulling but it seems they don't.</p>