nervousDev
nervousDev

Reputation: 75

Netbeans, C++ and Git

so I'm using NB with the C++ plugin and Git version control so I can work with colleagues.

I don't know what files are supposed to be "tracked" and we are getting problems because if we only add the code files to git, new files are not being automatically add to NB but only in the physical folder. We figured out that the configuration file is the problem but if we had it to repository we get another problem, absolute paths to the files.

What is the solution for this?

Cheers

Upvotes: 0

Views: 553

Answers (1)

ollo
ollo

Reputation: 25350

I don't know what files are supposed to be "tracked"

As a rule of thumb:

  • Source / test files
  • NetBeans project files nbproject (some files only, see below!)
  • Possible project related files, that are not generated for each compilation
  • Makefile

What shouldn't go into git (and therefore onto your gitignore):

  • build directory
  • dist directory
  • within nbproject ignore these:
    • private dir
    • The Package-* and Makefile-* files

About the last (Package-* / Makefile-*) files i'm not completely sure - please try with them on gitignore first.


Let's assume such a project - put everything with a (x) on gitignore:

<project>
|
+- build/ (x)
|
+- dist/ (x)
|
+- nbproject/
|   |
|   +- private (x)
|   |
|   +- some files (as above)
|
+- src/
|
+- test/
|
+- Makefile

Upvotes: 3

Related Questions