What files and directories should be ignored when installing my Yii project under version control?

Using the Yii PHP framework with Mercurial as version control.

What files and directories should be ignored when installing my Yii Webapp project under version control (that is, what to add .hgignore)?

+4
source share
3 answers

One example (for Git, but you can adapt it to Mercurial) recommends ignoring:

  • swp - VIM exchange files
  • .buildpath , .project , .settings - files and folders created by Eclipse
  • .idea - folder created by JetBrains PhpStorm
  • assets/* - everything under the assets is generated by Yii at runtime
  • runtime/* - the same applies to everything that is at runtime, we would not want to control versions
  • protected/data/*.db - for sqlite users, stop monitoring sqlite databases
  • protected/tests/report/* - code coverage testing report (I just started practicing TDD, therefore, this)
+2
source

Below is the default value for Yii from github , it is not for mercurial, but you can transfer it. also available for other frameworks and IDEs

+1
source

Synthesis and synthesis of previous answers (without exact file lists, but general principles)

For any tool and any generally accepted SCM rule "Do not store working artifacts in a repo, keep a minimal set of objects that allow you to continue working in any new place"

+1
source

Source: https://habr.com/ru/post/1438752/


All Articles