Create account / Log in

Switching from svn to git?

Discussion area for the development team.

Moderators: Tim M, uckelman

Switching from svn to git?

Postby uckelman » November 20th, 2013, 8:15 pm

The VASL devs are planning to switch from Subverison to Git for version control soon. I had not been planning to do this until V4, due to difficulties with converting our existing svn repo to git, but as a side-effect of helping the VASL guys convert their repo, I figured out how to convert ours as well. So, if we wanted to, we could switch to git at any time without losing any of our history. (In fact, our history would be a bit improved by switching to git. In svn it's hard to follow the history back further than revisions around 990, when I finished reorganizing the svn repo, and I found a way to straighten that out when converting to git.)

So, there are two issues to consider:

1) Do we want to switch to git now?

2) If we switch to git, do we want to use github.com for git hosting?

Regarding #1: There's a git plugin, EGit, for Eclipse. It looks easy to install, and there is a general git tutorial and a user guide. Git's documentation is thorough and there is a tutorial specifically for people switching from svn, as well as a general tutorial. I'm an experienced git user, and I'm also happy to answer questions. Coming from svn, I can say that it took me a few days to understand how git works, but after that I never wanted to use svn again.

Regarding #2: With git, your working copy is a complete repo in itself. (This is not like svn, where what you have in your wokring copy is just the branch and revision you have checked out.) Because you have all of the data locally with git, you can very quickly switch between branches in your working copy. You can also very easily apply commits from branches in other repos to branches in your own repo. The way people tend to use git is to have their own repo for the project, into which they periodically merge changes from other developers. (Merging tends to be painful in svn, but is usually simple in git.) What we do for one of my company's products is that each developer has his own repo, and then we have a master repo where we keep the canonical state of things. So, the branches belonging to each developer in svn end up as a developer's repo in git, while the trunk in svn ends up as our master repo.

That said, GitHub makes all of this very easy to do. You have an account, you can create as many public repos as you want, and then your local repos track those public ones at GitHub. You push local changes out to those public repos on GitHub. If you want to merge changes from some other repo, you do a pull from that repo---which you will have access to because it's a public repo on GitHub.

SourceForge's setup for git hosting is not as nice. The history browser for GitHub is far better than SF's, and that's something I find myself using often. It also looks like you have to be a project admin to fork (i.e., copy) a repo, so there ends up being some friction with getting set up. One thing I'm convinced of is that it's a good thing to have your own repo to mess with, because it frees you up to do things you might not do otherwise without having any fear of borking things in an irrecoverable way.

So:

My inclination is to switch to git regardless of where we host our public repos, but also to use GitHub for hosting them.

Are you guys amenable to this?
User avatar
uckelman
Site Admin
 
Posts: 8025
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Switching from svn to git?

Postby Brent Easton » November 21st, 2013, 12:38 am

On 21/11/2013 7:15 AM, uckelman wrote:
>
> So:
>
> My inclination is to switch to git regardless of where we host our
> public repos, but also to use GitHub for hosting them.
>
> Are you guys amenable to this?
>

Sounds good to me. Hopefully I will find some time to get back to Vassal
at some stage!

--
____________________________________________________________
Brent Easton
Analyst/Programmer
University of Western Sydney
Email: b.easton@exemail.com.au
User avatar
Brent Easton
 
Posts: 2736
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Switching from svn to git?

Postby Brent Easton » March 29th, 2014, 10:14 pm

Hi Joel,
Where is the master source repository now?
Thanks,
Brent.
User avatar
Brent Easton
 
Posts: 2736
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Switching from svn to git?

Postby uckelman » March 29th, 2014, 10:39 pm

Thus spake Brent Easton:
> Hi Joel,
> Where is the master source repository now?

Same place it was before. I didn't switch us to git. I think I won't
until VASSAL 4.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8025
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Switching from svn to git?

Postby zenbitz » January 7th, 2016, 5:25 am

I just heard about vassal 4, I feel strongly that that it should be in git/github. I know that for OCS (one of my favorite game systems) there is a bunch of extra code that got added, but it's not in any useful repo.

Github is *the* place for OSS projects now. It's where people will look, it's where people will find it to contribute.
zenbitz
 
Posts: 1
Joined: January 7th, 2016, 5:23 am

Re: Switching from svn to git?

Postby uckelman » January 10th, 2016, 11:26 pm

Thus spake zenbitz:
> I just heard about vassal 4, I feel strongly that that it should be in
> git/github. I know that for OCS (one of my favorite game systems) there
> is a bunch of extra code that got added, but it's not in any useful
> repo.
>
> Github is *the* place for OSS projects now. It's where people will
> look, it's where people will find it to contribute.

Using Git and GitHub for hosting the repo has long been my plan for V4.

Moving the current codebase isn't worth the effort, in my opinion, and
I say this after having tried several times to do a history-preserving
conversion from SVN to Git.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8025
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Switching from svn to git?

Postby aetheriac » July 13th, 2018, 2:34 pm

Hi everyone, I was just planning on starting some module code and really hate using svn.
I did start a conversion of the svn repo to git. It completed, but I have not had a chance to dig into it for the level of history yet.
I used the Atlassian tool found here: https://www.atlassian.com/git/tutorials ... g-overview
I only did the VASSAL-src module, and took it from 3.2GB to 500MB. At least half of it looks to be svn related.

I have an authors.txt file, but didn't fill in any proper emails or anything for proper conversion. Also, there were a few tags that had spaces in them that might have clobbered each other. I'll try to dig into the repo to see what the history looks like soon and get back to this forum. This should be the current development branch 3.2.18.
-dion
aetheriac
 
Posts: 2
Joined: July 13th, 2018, 2:26 pm
Location: Minneapolis MN (USA)

Re: Switching from svn to git?

Postby aetheriac » July 15th, 2018, 1:49 am

I uploaded to github, here is the repository https://github.com/aetheriac/vassal_3.git
It is so much faster than svn.
aetheriac
 
Posts: 2
Joined: July 13th, 2018, 2:26 pm
Location: Minneapolis MN (USA)


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest