Anonymous user
Open Source Comes to Campus/Resources: Difference between revisions
Open Source Comes to Campus/Resources (view source)
Revision as of 19:45, 21 June 2013
, 10 years ago→Introduction to Version Control
imported>Shauna No edit summary |
imported>Shauna |
||
Line 95:
==Introduction to Version Control==
'''Why version control'''
* 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.)
* How did you keep track of different people working on different files?
** Some people will say they emailed around different copies of files.
Line 106:
** 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 )
Line 118 ⟶ 121:
** 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'''
* 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''.
* 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'''
** (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.
Line 134 ⟶ 142:
* 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==
|