문제

Using the Yii PHP framework with Mercurial as version control.

Which files and directories should I ignore when putting my Yii webapp project under version control (i.e. what to put in .hgignore)?

도움이 되었습니까?

해결책

One of the examples (for Git, but you can adapt it to Mercurial) recommends to ignore:

  • swp – VIM swap files
  • .buildpath, .project, .settings – files and folders generated by Eclipse
  • .idea – folder generated by JetBrains PhpStorm
  • assets/* – everything under assets are generated by Yii during runtime
  • runtime/* – same goes to everything under runtime, we wouldn’t want to version control them
  • protected/data/*.db – for sqlite users, stop version control sqlite databases
  • protected/tests/report/* – code coverage test report (Just started practising TDD, hence this)

다른 팁

Here is the default for Yii from github, its not for mercurial but you can port it. also there are for other frameworks and IDE's

Synthesis and generalization of the previous answers (without exact file-lists, but common principles)

For any Tool and any SCM widely-accepted rule is "Don't store working artifacts in repo, store minimal set of objects, which allow you to continue your work on any new place"

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top