If you are using git already, it won't take much to move your repositories to Github. Bitbucket will pretty much be the same commands. I already had an account so I won't describe how to sign up, but its pretty easy. Once signed in you can create a repository by clicking the little plus sign in the top right corner. Name the repo whatever your project name is and opt to leave it empty (I presume you already have the project hosted at sf.net). You should make sure you're up to date on every branch from sf.net first. Once that is done you can just go to your local repo and issue the command:
git push https://github.com/[USERNAME]/[PROJECTNAME].git master
and repeat for every branch besides master.
You can then delete the local repo and re-clone it using the URL github give you, or just edit .git/config to update what URL origin points to, or there's some git command to do it that I can't remember. You can also go delete your project from sf.net BUT I decided to leave the skeleton of the project with links to the new home at github.
To do so make sure you haven't pointed your repo's origin to github yet. If you have substitute the sf.net project git URL for origin. Go delete every branch but master on sf.net by entering:
git push origin :branchThen on master branch do (carefully):
rm -rf *
echo moved to [github project URL] to boycott sourceforge >> README
git commit -a -m "boycott sourceforge"
git push origin master
Careful, because
rm -rf *
deletes everything in the current directory. This makes it so your repository is now empty except a nice little statement of what we think of the new sf.net.I only had source tarballs in the files section so I deleted them all and added the same readme as is in the repo. If you use this feature of sf.net it will be harder to find a substitute. This blogger subjectively goes through 14 alternatives and decides to stick with sourceforge. Hopefully you can find one of the alternatives workable. I also edited the project description to say that the project had moved.
If your project has a website you can move it to github quite easily too. Just go to your repo that is now using github for the origin and type:
git checkout -b gh-pages
rm -rf *
The name of the branch (gh-pages) is very important. Download the site source from the sourceforge ftp if you need or if you have a local copy just copy it all into the repo. Make sure you have an index.html and then just:
git add *
git commit -a -m "adding site"
git push origin gh-pages
Your new site is at http://[USERNAME].github.io.com/[PROJECTNAME]
Not too bad!
I wish I had a good answer about binaries. If you use other features like mailing lists you might have to do some more homework too. If you have found good solutions, spread the word, leave a comment.
Now, as a commentary, SourceForge hasn't done anything illegal. The GPL of most open software allows them completely to package it with adware, malware or whatever. But is that cool? Heck no! So on grounds of ethics, it has come time to boycott. Do not visit sf.net, do not download from there, and do not give them your code to host. I avoided Github for a long time because I felt they weren't as dedicated to open source, since their site code is not open (and partially because I tend to kick back when something seems trendy). But honestly it seems they've found a business model that is working for them and allows us more freedom for free software projects. SourceForge is not what it once was, and we owe the current management of it no loyalty. I don't really mind which service you move to, but don't stay.
No comments:
Post a Comment