Hello everyone!
In this instructable I'm going to show you how to backup your Arduino sketches for free using Bitbucket.
Bitbucket is source control service which is very similar to Github. It allows for storing of projects or code which can be accessed from other machines, or viewed directly on their website.
I do think Github is easier to use, especially setting up for the first time, but Github does not allow you to make the code private without signing up for one of their paid plans, which start at $7 a month.
Normally I'm all for Open Source, but this is mostly going to be used for backuping Arduino projects that could contain passwords or keys that you do not want to make publicly accessible.
There is a few setup steps, which I'll go through in this Instructable, that only need to be done the first time. After you are set up backing up your code will only take seconds. Setup will take roughly 10 minutes.
If your hard drive was to break right now, how many Arduino sketches would you lose? Lots of things could go wrong where you are left wishing you had your sketches backed up, such as losing your laptop or accidentally deleting something.
Another big advantage is it gives you access to your sketches even when you are not on your computer and you can even view your code via their website.
As mentioned, this setup is completely free and will only take a few minutes, so there really is no reason not to do it!
If you have any questions on any of this please let me know in the comments and I will try explain it better!
Next we are going to add the code locally to SourceTree.
We are almost there... I promise!
At this point the code is still only stored locally on your machine, but we want it to be backed up on Bitbucket. We need to configure a remote repository (basically somewhere to store the code on Bitbucket). To do that we need to do the following.
This is the final hurdle, we are so close :)
We now want to push the code to the remote repository on Bitbucket. Github does a much better job of handling all this setup, but I don't think avoiding doing this instructable is worth $7 a month!
This has been a lot more complicated than I would have liked to be! But once it's setup it's much easier to use going forward. Let's do a really quick demo of how it works from here on in.
And that's it! Your new changes will be backed up to Bitbucket!
Hopefully you find this useful and as always if you have any questions please let me know.
Thanks!
Brian