GriffinBabe GriffinBabe - 9 months ago 73
Git Question

Eclipse Git: Can't add folder to index

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 ?

Answer Source

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?).