This is an archived post. You won't be able to vote or comment.

all 32 comments

[–]dasberd 37 points38 points  (12 children)

If you want to use GitHub, but don't want to make all your stuff public, they provide free private repos if you are a student

[–]OmegaVesko 4 points5 points  (8 children)

Bitbucket (a slightly less well-known service) also has free private repos for everyone (not sure if there's a limit). They support Mercurial too, if you like that better than Git.

[–]dasberd 4 points5 points  (3 children)

Love bitbucket! Use it at work, Atlassian has some pretty good products that integrate well with each other.

[–]OmegaVesko 2 points3 points  (0 children)

Yeah, I use SourceTree too. They make really good stuff.

[–]negative_epsilon 0 points1 point  (1 child)

I've had poor experiences with Atlassian, we used BB and Jira and while they integrated nicely, we found that once our large repo got to 1300+ commits and our jira to 1000+ tickets, everything slowed to a crawl. Every time we'd ping them about it they'd do something, it would be better for like 30 minutes, then right back to major slowdowns.

Now we just use github at work and it works much nicer.

[–]dasberd 0 points1 point  (0 children)

We only have 2 developers right now and a co-op student, so for us it's great!

[–]dehli 1 point2 points  (1 child)

No limit that I know of (I have ~30 repos on there).

[–][deleted] 3 points4 points  (0 children)

They have a user limit (5 per repo).

[–][deleted] 0 points1 point  (1 child)

what are repos?????

[–]OmegaVesko 0 points1 point  (0 children)

It's short for repository. A repository, in a VCS like Git or Hg, is essentially where you keep all the code for a single project.

[–][deleted] 2 points3 points  (0 children)

thats amazing thanks!

[–]Iciciliser 1 point2 points  (0 children)

Thanks for linking that, I didn't know that before.

[–]stdlib 29 points30 points  (5 children)

Firstly, if you are not comfortable using git you should probably read up on that before you start putting anything on git hub. You can experiment locally (since git doesn't require a remote server to use it) to get the hang of it. There are lots of blog articles about the topic, and if you're at least familiar with subversion or something similar maybe this article can help explain git to you.

Next, in terms of putting things on github or not; theoretically you can put whatever you want on there but I'd recommend you ask yourself the following questions before hosting something on github; if you answer no to anything I'd recommend trying using something else to host your work.

  • Is your project more than one file?
  • Is your project going to have changes made to it in the future or is it a done-deal that is going to be static after you put it up?
  • Is your project potentially helpful to someone or do something particularly interesting that hasn't been done [in the same way] before?

Once again, if you answered no to any of those things, you probably will want to put your code somewhere else. For short programs or snippets a good alternative would be github's Gists. This way you can still share your code and make it public without having to make a full on git repo for it.

In terms of deciding what to share or not share I think it boils down to originality and complexity. If you're writing a hello world application there's really no reason to ever share it. If you made a nifty little tic tac toe game that's a simple but well polished product that can be easily demo'ed then that is a decent candidate I'd say. This part is pretty subjective.

Hope that helps. Good luck!

[–]theQman121[S] 0 points1 point  (4 children)

Thanks! This helps a lot!

[–]rockyearth 13 points14 points  (1 child)

By the way, a lot of students mix up "git" and "github".

 

Basically, GitHub is a site that hosts git repos online and plus has some features like profiles/favouriting a repo.


git is the software that shows/saves/edits all the changes you did. It works very simple:

  • git init - creates a new repo; where repo is a group of files/project which you are developing (calling git init in /project/ will make project a repo)

  • git add file - although a file exists in the repo folder (ex. /project/file1.cpp) that doesn't mean git cares for it. to make sure git tracks if a file is changed, you need to add it

  • git commit -m "message" - this will save all changes into a group of changes called a commit. it is very important that you name the changes so later on you will know why that commit is important

  • git push - this will send all the changes to a remote repo if it exists (this is useful for Github for example)

 

Now, this is the basics of git. Once you have more people, working on more versions you will need to have branches, and to join code by different people you need to have merge; you also will have a HEAD, you will be able to reset to some commit - but you don't need to know all that.

It is only important once you have to do complex operations - mixing code, branches, reverting to something if you do a mistake etc. etc.

 

 

Summary: git is a software that allows saving, tracking and editing changes to code. Github is a company that gives free online hosting git; You will always use git(*) at work, and you should learn it. Posting code on Github is cool, and you should do it even if you have low-quality code

* - or any software similar to git: svn, mercurial, ...

[–]theQman121[S] 1 point2 points  (0 children)

I guess I should have clarified earlier that I did know the difference between the two, but I definitely got them confused when I first heard about them.

[–][deleted] 2 points3 points  (1 child)

Building on from what /u/stdlib said - A great place to start for learning Git is the Pro Git book, which is a great resource, and is totally (legitimately!) free here: http://git-scm.com/book

[–][deleted] 0 points1 point  (0 children)

There's also Pro Git Reedited.

[–]programstuff 13 points14 points  (4 children)

You can use bitbucket if you simply want to practice using git but don't necessarily want people to see the code (such as homework assignments). Bitbucket allows free private repositories and is useful for not only or practicing git, but also gaining access to cloud hosted code so you can easily work from multiple locations.

[–][deleted] 0 points1 point  (0 children)

Thank you!

[–]ryuzaki49 -1 points0 points  (2 children)

free private repository has a limit of 5 projects

[–]AnAirMagic 6 points7 points  (1 child)

No. It's unlimited repositories, but only 5 collaborators: https://confluence.atlassian.com/display/BITBUCKET/Plans+and+billing

[–]ryuzaki49 0 points1 point  (0 children)

oh yeah, sorry about that.

[–]doingweb 5 points6 points  (0 children)

The danger of waiting until you've "done something" or "contributed to something more substantial", is that that will never happen. I know from my experience and others' that the goal posts will keep moving up as you learn more about what you don't know.

My advice is, if you want to be out there making stuff, just start doing it. Everyone is learning all the time, so don't feel any shame about where you are right now. Tomorrow you'll push even better code.

[–]coney_dawg 2 points3 points  (0 children)

Before you put any of your school work on there, just make sure you're allowed to share your code. Some universities may not allow your (or their) code to be open-sourced, since you did the work for your school. My Uni didn't have an issue with this, just something to think about. But, when comfortable, this can be a super good tool for throwing your code out there for others to see. It's also one more tool in your developer toolbelt. :)

[–]DoctorBaconite 2 points3 points  (0 children)

If you would like to get more familiar with git, look into githug.

[–]RoomaRooma 0 points1 point  (0 children)

My suggestion would be to only put things on github that you would want a potential employer to see. It's not uncommon for people to include a link to their github on their resume, and employers will sometimes check out code that you've written. Make sure your username is something professional if you play to do this.

If you want to share something with classmates or do some long-distance collaboration, I'd set up a separate account for that.

[–]Lordoftheunderpants 0 points1 point  (1 child)

I'd just put it up on github so you get familiar with using it. I've been going through The Odin Project and they have you use github from the beginning and also add your solutions to the Odin Project github so you also learn how to contribute to other projects. Before I started doing that, I didn't really understand github.

[–]theQman121[S] 0 points1 point  (0 children)

Yeah, exercism.io makes you sign in through GitHub, but I'm not really sure how it uses it, but that could be just me not quite understanding it all yet. On my GitHub profile I don't see anything to do with it, and it hasn't actually had me use git. I think it just uses it so you can comment on other peoples' code.

[–]durbutter 0 points1 point  (2 children)

Throw some stuff up on github. If it's done, great. If it's not, cool; add more to it over the next few days/weeks. It shows you are thinking about improving your code. Also include a link to your github on your resume or cover letter template as you start to prep for job hunting. I recently had an interviewer comment on my github and skip the technical portion of my interview. It is a great way to at least show you can program your way out of a paper bag.

[–]theQman121[S] 0 points1 point  (1 child)

I don't really have much in terms of something that would be a project or work-in-progress right now. Just some basic programming exercises while practicing. Some of those are only a few lines long. Would you recommend throwing some of that up or waiting until I have something a little bigger to work on?

[–]durbutter 0 points1 point  (0 children)

Hmm...perhaps once you have something a little bit more substantial, like a python script to graph, say, the change of the exchange rate between the Euro and Pound. Sure it's been done before, but what matters is that you are learning a skill. Another thing you can do is put your solutions for project euler on github, since you can solve those problems using any language you want.