Egit problem with linked asset folders / Libgdx

Hey guys,
I tried working with the egit plugin for eclipse but when I add the core and desktop folder the linked assets in the desktop directory disappear and I need to manually copy the asset files into the folders again. Does anyone know why this happens and how I can solve this problem? I am new to git so I don’t really have experience with this.

Thanks :slight_smile:

I guess you are not using the gradle setup?

I am using the gradle setup and my project works fine but when I try to add the folders to the git directory and make my first commit, the linked asset folders don’t work anymore.

How are you adding the folders?
If you simply commit the gradle project system, gradle cares about the virtual linked folders.

eclipse {
    project {
        name = appName + "-desktop"
        linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/android/assets'
    }
}

task afterEclipseImport(description: "Post processing after project generation", group: "IDE") {
  doLast {
    def classpath = new XmlParser().parse(file(".classpath"))
    new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]);
    def writer = new FileWriter(file(".classpath"))
    def printer = new XmlNodePrinter(new PrintWriter(writer))
    printer.setPreserveWhitespace(true)
    printer.print(classpath)
  }
}

aus build.gradle.

If you are not using the android project, you can change this line:

 linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/android/assets'

ClaasJG

I click on the Project Folders and under Team->Share Project I create the directory for git (I think this should be done like that). I am currently not using android but would like to do that in the future.

Another question is how can I use git with bitbucket or github? I am still learning how to do that and don’t really know where to start.

See:

https://help.github.com/categories/54/articles

If you want private and public repositories you could use GitLab instead:

Thanks for the tips but I can’t get it to work. What I figured out so far is how to use git with bitbucket/github but I have still problems adding the git directory. Following error is displayed: