==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 !)
(FIXME: Go through this, and change the exercises so they start by having us make some edit to the page.)
* 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.
* 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.
* 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,▼
* 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,
** (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.