4

I'm using Eclipse for a Game Project using LibGdx as framework and Grandle (god I hate it).

I'm trying to push the repositories to GitHub, but I can't stage the "core" folder in the commit. It's considered unstaged.

When I try RightClick -> "Add to Index" it does and says nothing...

As you see, the "core" folder is unstagged

As it maybe usefull to know, the g2 project someway "contains" HarakaGameTwo-core & HarakaGameTwo-Desktop projects through Gradle...

Any idea how can I stage this folder ?

GriffinBabe
  • 146
  • 1
  • 12

2 Answers2

2

It looks like Eclipse isn't letting you add the core folder. First, it is a good thing that you didn't add that folder, because as you can see it contains folders called bin and build, both of which likely contain binary files. In general, you should not add binary files to Git because it doesn't handle these files well.

Now as to why you could not add core, the likely explanation is that not everything contained in this folder is managed by Git. Instead, you should only be staging files which are managed by Git (the src folder?).

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
  • @VonC Thak you! I finally did it, first off you can't add "bin" and "build" to your repositories, and second I had those .git folders in my "core" and "desktop". The fact this is a Gradle Project doesn't help at all... Even if I think opensource is a great thing, opensource softwares like Eclipse are always a bit confused... – GriffinBabe Nov 26 '16 at 14:21
2

Check if core itself does not include a .git folder, which would make it a nested repo, essentially ignored by EGit (and recorded by Git as a gitlink)
Egit latest releases (4.4 or 4.5) should detect nested Git repo (right click on core, Team->Share Project)

If this is not it, fallback to the CLI and check git status and git ls-files.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250