Force Mercurial (Hg) to automatically add new files

I am looking for the opposite mechanism for a .ignore file, which should automatically add all files of a given template, for example *.tex for any LaTeX documentation project or *.def for any file that has been added by OASIS (MS Access add-on for version control).

+6
source share
2 answers

hg add without arguments will add all files that are not explicitly ignored. You can also use hg commit --addremove to add all unknown files (and delete all deleted files, i.e. any hg rm that hg status lists as '!') To do this automatically when committed.

+9
source

Files are added only when hg add started. If you want to add all the files matching the pattern, use the --include ( -I ) -I .

+4
source

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


All Articles