Eclipse / Egit Integration

Hi All.

I'm slowing groping my way along learning the Eclipse / Sloeber IDE along with the integrated Egit plugin. Mostly via youtube tutorials. I've created a simple project that contains 2 files: 'HelloWorld.cpp' and 'HelloWorld.h'.

So, when I go to commit to the Egit repository I see a bunch of files in the 'Unstaged' area as shown in the attached picture. So, my question: Which files (besides the .cpp and .h files that I create) do I need to put into the repository.

If it makes a difference, I'm the single contributor to my projects. No collaborators.


It's going to try to jam every single file associated with your project into the repo. That might or might not be what you want. You know you want all the source code, so the .h and .cpp files definitely go in. But the rest is all Eclipse specific stuff like settings for the project. Those might be useful because you can easily clone the project into another instance of Eclipse on another computer. But they might also be a pain because if the other instance isn't exactly the same version of Eclipse then it starts to puke on the settings files that it doesn't recognize.

For all of my projects I just repo the .h and .cpp stuff. I figure the Eclipse specific stuff can be left up to whoever wants to clone that repo. Maybe they don't even want to use Eclipse at all. Really to me the source code files are what I'm really trying to maintain and share.

You probably don't want the stuff from the Release folder. That's all the compiled stuff from after a compile. You would only repo that part if you intend for someone to be able to grab the hex file directly from the repo and not need to compile the project again. Problem is that if you make change to the code and don't recompile before it goes to git then you end up with a hex file in there that doesn't match the code.

Thanks. I was thinking along the same lines -- only .h and .cpp files.