Domino Designer and .git folder mystery

Twitter conversation about version control has brought me to the debate about .git folder appearing in NSF file and how to avoid having it there.
I remember seeing one NSF file with .git folder in it a while ago and I've deleted it from NSF without any consequences. NSF is still fine, git repository it is connected to as well. But Cameron Gregor (and probably Sean Cull too) had different experience.
Cameron was kind enough to "record" how this happens on his computer. When I was reproducing his steps I noticed one step different to my usual workflow. It turned out that although I do not use EGit plugin directly to commit changes from on disk project to git repository I am in fact using it in one configuration step. And this turned out to be the crucial step to make it work right.
When you create on disk project, be it by exporting from NSF or cloning remote repository, next step should be to show DDE that this project is under version control. This is done by right click on ODP in Navigator, Team - Share project..., (optional) choose Git (this step is not shown if you have only one VCS plugin installed in DDE), check Use or create repository in parent folder of project and click Finish.
From now on DDE knows this project is under version control and ignores .git folder during sync between NSF and on-disk project.

Lessons learned: you need to install EGit plugin to avoid .git folder to appear in NSF file when syncing with on-disk project. Also worth mentioning is that you do not have to use it to interact with git repository if you prefer to do it from the command line. But you must have it installed.


My solution based on a tip from Gregor

I am still finding my way with GIT and I have had some bad experiences that I felt were due to GIT trying to manage a .git folder inside the NSF.

When you create a new eclipse project from a GIT repository the .git directory will be part of the project. Following a hint from Gregor I now create a parallel Notes folder and move the source files to that folder before then creating the eclipse project based on the Notes folder i.e. eclipse is not aware of the .git folder.

This will also allow me to have a wiki folder parallel to the .git and Notes folders in the future so that my repository can have more than just the source code.

I don't have eGit installed and am trying to keep it as simple as possible so that we just use DDE and Bitbucket Sourcetree for windows

in the git console ( easily accessible from sourcetree ) I create a new folder

mkdir Notes

then I move all of the notes source files into that folder

mv * Notes

then you need to do the .classpath manually as it is hidden

mv .classpath Notes

Then I add the Notes directory into eclipse and create an ODP. the .git folder is outside of the ODP

You only need to do this once. A downside is that all of your source files appear to have been deleted and then recreated in the GIT history as a consequence of the move.

See section 9.4 here =>

this document will become a public wiki soon hopefully.