문제

Is it possible to have a branch-specific ignore file in mercurial?

It would be handy to have dependencies included in a production branch, but not in a development branch.

도움이 되었습니까?

해결책

Mercurial always uses the checked out .hgignore file. So technically you can have different .hgignore files on different branches, but when you use this scheme, you need to take care that they stay different when you merge between this branches.

When you have only one system where the additional ignore patterns should apply, you can also specify an additional igore file within .hg/hgrc via the ui.ignore setting.

$ cat >> .hg/hgrc << EOF
[ui]
ignore=.hg/production_ignore
EOF
$ cat > .hg/production_ignore << EOF
# example ignore file, uses the same syntax as .hgignore
syntax: glob
*.swp
*.~
EOF
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top