views:

185

answers:

1

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.

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.

+1  A: 

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.

jhwist