Add all not tracked files at once

$ hg status

M ...
M ...
M ...
? ...
? ...
? ...

I need to add all not tracked (? marked) files. Is it possible? I can do "hg add *" but I will get many messages unwanted 'file already tracked'.


Solution 1:

Just use hg add with no *.

When no files are given, it adds all untracked files, that is, all files with ? in front of the output of hg status.

Files that are ignored because of .hgignore will not be added by hg add without filenames.