$ 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'.
The easiest way to add all files to your Git repository is to use the “git add” command followed by the “-A” option for “all”. In this case, the new (or untracked), deleted and modified files will be added to your Git staging area. We also say that they will be staged.
You have to add the untracked files of the repository by using the “git add” command and run the “git stash” command to save the untracked file and clean the current directory for working by removing the untracked file from the repository folder.
So, if you run git add . within a sub directory, it won't add changes to files outside that sub directory. Second, git add . adds both tracked and untracked files.
Most untracked files will be staged and committed. Others will simply be ignored by including them in the . gitignore file. However, some files and directories will remain untracked, and in certain instances it can be useful to delete these untracked files from your Git repo.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With