Github or Bitbucket? What's the benefit?

If all I want to do is version track my own code is it safe to say I don’t need either of these services and could simply use Git as installed on my Mac.

If you’re the only developer, and at least using Git or Subversion with good backups then you do not need those hosting services. They are useful to use for backups and collaborating with others if you wanted to do so.

For my home programming projects that I’m the only developer on I still have another Mac in my house that is setup as a remote Git Server using SSH, which is dead simple to set up.

For my work programming projects we are using Stash for all of our projects - coding, server configs, etc.

I’m trying to make the learning experience a little easier by narrowing the focus just to actions that make sense to me. Not that collaborative use doesn’t make sense but I’m trying to keep it simple. The Git docs, examples, and tutorial doesn’t seem to make sense as it applies to my needs at this point in the learning. I want a “hello world” experience. I want to create a repository for my “master” copy, make changes, perhaps access previous snapshots, branch the code for new features, merge the branch back in, etc. That is NOT obvious to me using the provided docs and I could very well be missing something. Or I could be overwhelmed having read too much documentation for Git, Github, and Bitbucket. I need version control for my brain right now.

you could use git locally on your Mac and be safe unless something happens to your Mac. I would sign up for BitBucket and replicate your git repos to it. I say BitBucket over GitHub is BB allows you to have as many free “private” repos as you want. GH you have to pay for private repos.

You could use a local installation of Git. But even as a single developer, the extra backup that you get from using a hosted service is worth it in my opinion. Plus BitBucket has a simple issue tracking system and wiki which can be handy.

If you haven’t watched the Source Control webinar, it is available now on YouTube.

Duane -

Here’s a decent site for learning the Git basics: http://try.github.io/

Atlassian also offers a lot of great Git tutorials here:

https://www.atlassian.com/git

They also offer a really good Git GUI client, which is also free:

http://www.sourcetreeapp.com/

Paul, I participated in the webinar on Tuesday and that’s how I started. I just don’t know what Git is? Like where’s it live? Is there a database? What’s on my machine after installing Git? If I have an account on Github or BB do I need to install Git? Would I be better off without Git installed on my local machine if I’m using GH or BB? How do I get a list of repositories on my local machine? How do I move them should I choose? How do I switch among my repositories? How do I delete one? Questions like that come to mind. I’ve put quite a number of hours into the tutorials and docs and not getting out of it what I would expect for my efforts. I’m not getting the interface. Repository, cloning, forking, committing, pushing, pulling, and merging. I can tell you what they all do but don’t get them in terms of a workflow using the tools. Sometimes in the docs it tells you to do one of these things and there no such UI element to invoke! Add to that trying to keep straight what is happening on the Github or BB account vs the local machine and which files are the ones to work on. Do I clone a master or do I fork it to make changes? And if I clone a master and find it’s a mistake how do I undo it?

Well I’m making some progress but I think learning DOS was easier. I think that what is confusing is that both GH and BB support their own online services and that’s where their docs and demos quickly take you.

I have good backups of everything but I would like having access to my code from my laptop as well and not have to worry about copying the latest code from my desktop machine.

[quote=64091:@Paul Lefebvre]You could use a local installation of Git. But even as a single developer, the extra backup that you get from using a hosted service is worth it in my opinion. Plus BitBucket has a simple issue tracking system and wiki which can be handy.

If you haven’t watched the Source Control webinar, it is available now on YouTube.[/quote]

Or you can opt for Atlassian Stash for $10 a year (10 user license) that goes to charity and install your own mini Bitbucket in your LAN and integrate with other Atlassian tools. I use an HP Microserver N54L for this purpose with most Atlassian tools (Jira, Confluence, Bamboo, etc) and works like a charm! For some projects I am unable to use hosted services (NDA) and this has solved most of my problems with SCMs.

I use Git extensively for both remote (GitHub) and local repositories.

Having your repository hosted off-site has its obvious advantages, e.g. access from anywhere, off-site backups, easy collaboration between international developers, etc.

However, for my wife I had to set up Git locally since she works with multimedia binary files (not source code files), and it turned out to become impractical to constantly sync 100MB+ files with a remote repository. It turned out to be easier to use Git locally, and then manually ensuring there is proper backups of the repositories.

If you are a Windows user I’d highly recommend TortoiseGit. It integrates very well with GitHub (didn’t know about BitBucket until this post so not sure about how it integrates with Bitbucket), and is super easy to use for local and remote repositories. Creating a new repository is simply a right-click on a folder.

The guys over at Wandisco, have some excellent webinars on Git:

http://www.wandisco.com/media/webinar-replays/git

Thanks for the suggestions everybody and the feedback on how you use Git/GH/BB. I seemed to have sorted out my issues by using the Git instructions. It starts off by describing a single user and then adds in collaboration features. Still, the docs are lacking. Setting up .gitignore is one example. It just doesn’t tell me enough to do it correctly for my local install which by this time is a mess.

Eventually I’ll clean it up and probably put my work on BB.

Duane, sorry for chiming in late. I wanted to tell you you’re not alone. I found git and all it’s counterparts to be confusing. I share many of the same questions you have. For me never liked not being able to easily see a list of the snapshots. Heck for that matter, where are all the files stored at? Anyway against the advice of forum members I made my own system that works the way my brain does. It used SQLite. I like it but it took about 40 hours longer than I expected (I originally budgeted 40 hours). After all that it still doesn’t have merging or diffing. Do I regret it, no. I know where every file is at and how it got there. It stores my files remotely on one of my macs so I have remote back ups. Now that I have it up and running I don’t think I will look back at Git or any other system.

Joseph - you say it stores them remotely on one of your Macs. If that Mac is in a different physical location, then that’s great. But if it’s just on a different computer but in the same building, that isn’t really considered remote. That said, I’m glad to hear you got your system working. :slight_smile:

Bill,

Yes I have the server on my mac mini at home and it syncs all files to the clients when they open the server connection. The clients can be at home on the mac mini, anywhere on my laptop or at work on my iMac. There is no chance of the three computers being in the same building at the same time. So at any given time the files are stored remotely. :slight_smile:

[quote=64200:@Duane Mitchell]Thanks for the suggestions everybody and the feedback on how you use Git/GH/BB. I seemed to have sorted out my issues by using the Git instructions. It starts off by describing a single user and then adds in collaboration features. Still, the docs are lacking. Setting up .gitignore is one example. It just doesn’t tell me enough to do it correctly for my local install which by this time is a mess.

Eventually I’ll clean it up and probably put my work on BB.[/quote]

I think it is fair to say that most people struggle with these tools at the beginning and I have found the best way to get people up and running is to concentrate in getting a basic workflow up and running, rather than trying to learn the whole tool. In this case I would suggest you concentrate on:

  • programming with the working copy
  • Checking your changes into the local repository
  • Comparing a file in the working copy to the checked in version
  • Reverting your changes from the local repository

Once you have learned these skills and are comfortable with them, then add:

  • Syncing your local repository to a remote repository on say BB
  • File compare and merge

At this stage you will have most of the skills for day to day work and can add the rest as needed.

I have been using git for many years now. I would say that 99+% of what I do with it is the very basics that I mastered very quickly. The non-basics are things that you will use so infrequently that you can look them up when (if?) the need every arises.

my first two suggestions to any new git user is get a GUI client that you like and to review the help (videos/tutorials/website) for git.

my next suggestion is play around with it on a directory/repo that you dont care about. practice the cli or GUI on that repo until you feel comfortable on the basics.

and my last suggestion is ask questions.

sb

[quote=64098:@Justin Elliott]Atlassian also offers a lot of great Git tutorials here:

https://www.atlassian.com/git

They also offer a really good Git GUI client, which is also free:

http://www.sourcetreeapp.com/ [/quote]
Yes, this tutorial was good and I’m understanding the client now that I know more about what it does.

I also liked the Git tutorial on basics:
http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository

I recently jumped on the GIT bandwagon and I’m a bit embarrassed that it took me so long. My “little” project has started to sneak up on 100K LOC and drop box with manual revisions is no longer cutting it. Git is not the most intuitive thing to pick up and the command line is a bit daunting for people new to source control. That said I now “git” it…sorry for the pun. Even for solo developers like myself the advantages of source control have become immediately apparent.

Bitbucket plus SourceTree is a great combo and FREE.

BitBucket allows you to have as many free private repos unlike GitHub. But either is good.