I'm开发者_StackOverflow中文版 using TortoiseHG to commit code into a repository. Part of the system is symbolic links and these are throwing errors and are not allowing code to be committed. These directories do not need to be committed, so is there a way I can just ignore the directories?
If you have untracked content in your working folder, and want to keep them as untracked, there's generally three ways to do that:
- Never issue any of the "please figure out what needs to be added and removed for me" commands (
hg addremove
andhg commit ... --addremove
are examples of this) - Specifically list the files that you want to avoid being added, every time you issue such a command
- List them in your
.hgignore
file
If you want to go with option 3, then you should consult the documentation for .hgignore. In general, you can just list the names of the files in that file, it's just a normal text file, but there's a few options regarding syntax for that, so best to just check the documentation.
精彩评论