funny that when .hgignore is added for Mercurial,

2019-06-28 08:56发布

Is it normal? So you just need to add \.hgignore to the list to ignore itself?

2条回答
一夜七次
2楼-- · 2019-06-28 09:02

Just to supplement Borealid's answer: ? in hg status means that the file is in the working directory, but not tracked. You usually see it in one of two situations:

  1. A file got generated that you don't need to check in, like a compiled binary or something.
  2. You added a new file to your project, but haven't hg added it yet.

In #1, you'll want to add the file or file type to .hgignore. In #2, you want to hg add the file. In the case of .hgignore, it's #2.

查看更多
成全新的幸福
3楼-- · 2019-06-28 09:13

Yes, but you don't want to ignore the .hgignore file. When a new person checks out your repository, don't you want them to get your ignored-files list? Instead, do hg add .hgignore; hg commit.

Bottom line: .hgignore is tracked like any other file in the repository.

查看更多
登录 后发表回答