Open Source Comes to Campus/Resources: Difference between revisions

imported>Shauna
No edit summary
imported>Shauna
==Introduction to Version Control==
 
(This talk is assuming you are speaking at Wellesley College. You're probably not going to be speaking at Wellesley, so you'll need to make a handful of changes!). For instance, it is highly recommended that you browse through the wiki page history of your campus's school ahead of time to find a fun edit to use as an example.
 
'''Why version control'''
(FIXME: Go through this, and change the exercises so they start by having us make some edit to the page.)
 
* How many of you have ever worked on a group project? (Pause for hands raised.) How many of you have worked on a group project spanning multiple drafts or iterations, or that took a few weeks or even longer to complete? (Pause for hands raised.)
* In open source software, people use version control to keep track of files as they change. To give you a sense of what this is for, how many of you have worked on group programming projects? (A few hands raise up.)
* How did you keep track of different people working on different files?
** Some people will say they emailed around different copies of files.
** Attendees will typically chuckle.
* So, yeah, one common way to do that is to email around copies of a file you're working on. A different way is to use what's called version control, where there is a system for tracking different versions of a file. The most popular tools let every contributor keep a copy of the project on their own computer, making whatever changes they want, and eventually synchronizing with the rest of the team.
 
'''Wikipedia'''
 
* To talk about version control, I want to show you how version control works for purely text documents. So let's look at the Wikipedia page for Wellesley College.
* (Navigate web browser to http://en.wikipedia.org/wiki/Wellesley_College )
** On that page, you can see the one '''+''' line: the addition of this link to a different school in New Zealand. In particular, this shows us that there are no changes other than the particular one about the new link.
 
'''Different version control tools out there'''
* Whew. That was a lot. Are there any questions? I'm happy to go over and review anything here. (Take questions from the whole group, since probably someone else has the same question as any individual person who asks.)
* So that's the very basics of what version control is. In open source projects, probably the most popular version control tool is called ''git''. It's a command line program, and during the laptop setup process you already installed it hopefully. A lot of projects tracked with git also use Github, which is a website for browsing these git ''repositories''. One fun git repository that's hosted on Github is this one,
* We're going to focus on git and github today, but you might come across other version control systems and websites today and in the future, so I just want to mention a few of them:
** Other systems: Some of the more popular version control systems include Mercurial, Subversion, GNU-Bazaar. There are some proprietary version control systems, too, but we don't bother with them.
** Then there are some code hosting sites that work with different types of version control systems. Github works with git. Google Code works with git, mercurial, and subversion. Bitbucket works with mercurial and git. Again, there are other hosting sites, too many to mention here.
** If you're trying to work on a project but you're having trouble understanding their version control system, check and see which one it is. We have training missions on Openhatch.org for using git and subversion, and can likely help you informally on #openhatch if it's some other system.
 
 
* So that's the very basics of what version control is. In open source projects, probably the most popular version control tool is called ''git''. It's a command line program, and during the laptop setup process you already installed it hopefully. A lot of projects tracked with git also use Github, which is a website for browsing these git ''repositories''. One fun git repository that's hosted on Github is this one,
'''Other things you can use version control for'''
** (go to https://github.com/bundestag/gesetze)
 
** which is the law of Germany. It's a good example of a version control project, tracked in git, where not everyone is allowed to edit the repository. But we can click around on their Github site and see all the commits.
** Again, one difference here is that Wikipedia is the encyclopedia that anyone can edit. For Wikipedia, that means that as soon as we edit a page, it's automatically live. For open source software projects, or the German legal system, there's often a review process -- you can use version control to prepare a diff and share it, and if the maintainer likes it, they ''merge'' it into the main project.
** (Click "Commits" -- https://github.com/bundestag/gesetze/commits/master )
* Another difference is that in git, revisions are called commits. They track not just changes to one file, but the entire state of the project at that time. So when you click "Browse code" at the most recent commit, it takes you to e.g. https://github.com/bundestag/gesetze/tree/ee428461b034de54f1cdcab524d2808486383677 which shows you the entire project.
* If you finish that, work through this second URL:
** (put on projector: http://try.github.io/ ) but we really encourage you to work through the training mission first.
 
'''Exercises & Follow up'''
 
==Career Panel==
Anonymous user