开发者

How do I get Eclipse CDT to ignore files

I have a C++ project in Eclipse. The project uses Perforce and Eclipse has the Perforce plugin installed. Everything was fine, until I decided to create a git repo in my project. I created the git repo to snapshot some changes which I wasn't ready to commit. Everything was fine until I refreshed my files in Eclipse. Two problems have occurred:

  1. Eclipse found my .git folder, and indexed all of the files inside of it.
  2. Eclipse also decided to add all the git file to my pending change list.
  3. 开发者_运维技巧

If I create a new file within Eclipse, I'd like it to add it to Perforce, but if it happens to find a file, I don't want it to do anything with it. I'd also like to give Eclipse a list of file types to always ignore, just like I do with my .gitignore file.

I'm using the P4WSAD plugin, but I'm pretty sure the problem can occur anytime you have files you want Eclipse to not see.


Just add a file .p4ignore in your project root and add everything you want P4WSAD to ignore, such as

.git

See the docu on P4WSAD for more info.

That should take care of the Perforce part of your question. For the Eclipse part, please see this SO question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜