Open Source Comes to Campus/Resources: Difference between revisions
Content added Content deleted
imported>Shauna |
imported>Shauna No edit summary |
||
Line 1: | Line 1: | ||
__toc__ |
__toc__ |
||
⚫ | |||
⚫ | |||
== Command line basics == |
== Command line basics == |
||
Line 10: | Line 14: | ||
* [[OSCTC Resources/OSX command line|OS X]] |
* [[OSCTC Resources/OSX command line|OS X]] |
||
* [[OSCTC Resources/Linux command line|Linux]] |
* [[OSCTC Resources/Linux command line|Linux]] |
||
⚫ | |||
⚫ | |||
==Open Source Communication Tools== |
==Open Source Communication Tools== |
||
Line 28: | Line 28: | ||
* [[OSCTC_Resources#IRC_Demo | IRC Demo]] |
* [[OSCTC_Resources#IRC_Demo | IRC Demo]] |
||
* Slides 13-19 |
* Slides 13-19 |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | * 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. |
||
⚫ | |||
⚫ | |||
⚫ | * So one of the great things about Wikipedia is that the system keeps every track of every version of every article. The wiki system is a version control system, too. If you click on the "Edit" tab, you can see the built in way to edit every article. Let's take a look at the ''history'' tab here. (click history tab) |
||
⚫ | |||
⚫ | * So here, you can see a little heading for every version of the page, including (mouse over the date) the time and date of that version, who saved that version, and a brief summary of what the changes are. Here, the most recent version says +73 -- that means that 73 characters were added in that revision. |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | * Let's hit back, and take a look at an older version that has an edit summary. In this case, we see they say they added a note about New Zealand. When we click the date (Click the date)... and load the page, we can see visually that the page seems to have a note about New Zealand. But we don't know just from looking at this version of the page if maybe they made other changes. |
||
⚫ | * You folks already saw diffs, and like most version control tools, Wikipedia lets you see a diff between the two pages. It's line-based, like a lot of tools used in programming. Let's click back... (back to http://en.wikipedia.org/w/index.php?title=Wellesley_College&action=history ) and instead of clicking on the date, we'll select this revision as the first item selected, and the one right after it as the one we want to diff against. When we click "Compare selected revisions", it takes us to a page like http://en.wikipedia.org/w/index.php?title=Wellesley_College&diff=558216275&oldid=556114296 |
||
⚫ | |||
⚫ | |||
⚫ | * 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, |
||
⚫ | |||
⚫ | |||
⚫ | ** 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. |
||
⚫ | |||
⚫ | * 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. |
||
⚫ | |||
⚫ | ** One more difference is how the version numbers are encoded. In git, the revision number is a checksum of all the important information about the commit: the name and email address of the person who made the change, plus the contents of the files that are part of the commit, plus a timestamp of when the commit was made, plus a few other bits of data. In some systems, the version numbers are just numbers that increase over time. With git, since every person uses their own computer and can make commits whenever they want, the commit IDs can't collide, so they're computed based on the content. |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=== Diff and Patch Demo === |
=== Diff and Patch Demo === |
||
Line 128: | Line 86: | ||
* different servers vs different channels (#openhatch on other servers might be empty) |
* different servers vs different channels (#openhatch on other servers might be empty) |
||
* how to make a new channel, if asked |
* how to make a new channel, if asked |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | * 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. |
||
⚫ | |||
⚫ | |||
⚫ | * So one of the great things about Wikipedia is that the system keeps every track of every version of every article. The wiki system is a version control system, too. If you click on the "Edit" tab, you can see the built in way to edit every article. Let's take a look at the ''history'' tab here. (click history tab) |
||
⚫ | |||
⚫ | * So here, you can see a little heading for every version of the page, including (mouse over the date) the time and date of that version, who saved that version, and a brief summary of what the changes are. Here, the most recent version says +73 -- that means that 73 characters were added in that revision. |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | * Let's hit back, and take a look at an older version that has an edit summary. In this case, we see they say they added a note about New Zealand. When we click the date (Click the date)... and load the page, we can see visually that the page seems to have a note about New Zealand. But we don't know just from looking at this version of the page if maybe they made other changes. |
||
⚫ | * You folks already saw diffs, and like most version control tools, Wikipedia lets you see a diff between the two pages. It's line-based, like a lot of tools used in programming. Let's click back... (back to http://en.wikipedia.org/w/index.php?title=Wellesley_College&action=history ) and instead of clicking on the date, we'll select this revision as the first item selected, and the one right after it as the one we want to diff against. When we click "Compare selected revisions", it takes us to a page like http://en.wikipedia.org/w/index.php?title=Wellesley_College&diff=558216275&oldid=556114296 |
||
⚫ | |||
⚫ | |||
⚫ | * 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, |
||
⚫ | |||
⚫ | |||
⚫ | ** 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. |
||
⚫ | |||
⚫ | * 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. |
||
⚫ | |||
⚫ | ** One more difference is how the version numbers are encoded. In git, the revision number is a checksum of all the important information about the commit: the name and email address of the person who made the change, plus the contents of the files that are part of the commit, plus a timestamp of when the commit was made, plus a few other bits of data. In some systems, the version numbers are just numbers that increase over time. With git, since every person uses their own computer and can make commits whenever they want, the commit IDs can't collide, so they're computed based on the content. |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
==Introduction to the Command Line (as needed)== |
==Introduction to the Command Line (as needed)== |