Libgdx and Subversion

Hello JGO, i hope i am posting this in the right place…
I wanted to setup a SVN-repository for a current Libgdx project i am working on. This would help me to review changes and keep clean and working code in the repository.
I downloaded and installed Tortoise SVN and the Subclipse-plugin, as i am working with Eclipse.
The projects have been generated with the Libgdx setup, so i have 5 projects: “Core”, “Android”, “Html”, “Desktop” and 1 wihout suffix (whats the purpose of that project?).
I managed to create a repository and i have put those projects under version control using Eclipse->share projects->SVN.
Then i started to create the ignore list as suggested here and i also ignored “.gradle” and “build/” as suggested in the “.gitignore” file.
This works pretty good, i can review changes and check them in. The problem is, that now i want to create a second workspace, with this projects, so that i can work on two different things at the same time, without getting confused which code belongs to which thing.
So i checked out the things into a second folder and imported them into Eclipse using “Import->Existing projects into workspace”, but for some reason gradle isn’t working there. All projects, except the one without suffix, show errors, they can’t find the Libgdx-classes. Also refreshing the projects using gradle-> refresh all won’t work. For the android project it says that there is no method “android()”, for html project it says that there is no method “gwt()” and so on.
It also says, that it can’t fetch the grade.zip file. However, in the other workspace, everything is working, so i can’t understand whats the problem here.

Therefore i would like to get a step-by-step guide on how to setup a SVN-Repository, how to check-in the existing sources/projects, which files i should ignore and how to check-out and import the projects into a second workspace.
If it would be easier using any other versioning-tool (for example git), that would be okay to, but i want to be able to set up a local repository, not on github or anything similar.
If there are any missing informations, please tell me.

Thanks a lot!

Any reason why you are using SVN? I’ve got nothing against SVN, I use it at work and it has all the features I need. But for source management at home, i use out-of-the-box solutions like BitBucket and GitHub. They are really easy to set up, but of course they are based on Git.

Use GIT. The philosophy behind GIT is actually that you always have your local repository and it is very easy to set up but at first not so easy to get accustomed to. It is worth the effort though! You will easily find step-to-step explanations for that.

When you have GIT installed it is something along those lines: (change to your project folder first)


git init
git add --all
git commit -m "Initial Commit"

Then would follow a push but for that you have to set up a bare repository somewhere else and set the origin before.

I wanted to use SVN, because i use it at work and so i am used to it. But as i said, if it is easier to use other versioning-tools, i can use them to.

So it seems like Git it the way to go. Is there any graphical tool for git, just like Tortoise for SVN?
So Git can also be used locally? I just want to have a local repository on my notebook and a few working copies of it, on which i can work.

Thanks a lot.

TortoiseGit :point:

“So can Git be used locally?” All Git is local, you commit to a local repo, and periodically push to a remote repo. Lookup DVCS - distributed version control.

[quote=""]
Really? Thats awesome :smiley: I will try that out and i hope, that this solves all those gradle problems.

Thanks a lot for your help, i’ll tell you if that solved the problems!

I tryed TortoiseGIT now and it seems to work.
What i did:

  1. I copied the folder, which contains all the projects, into another folder, where i plan to store the repositories.
  2. I right-clicked the folder and executed “create repository here”.
  3. I added all the “.project” and “.classpath”-files, because they were on the “.gitignore” list.
  4. I checked out the folder
  5. I used Eclipse->import->GIT, which showed me all the projects and imported them without poblems. Even the gradle-build is now working.

Thanks a lot!

Medals for everyone :slight_smile: