Upload
jason-noble
View
189
Download
1
Embed Size (px)
DESCRIPTION
Citation preview
What is Revision Control?
• Keeps track of changes over time• Allows you to go back in time• Helps prevent code from “disappearing”
Revision Control Systems
• cp –R source_dir source_dir-2013.02.20.12.18.52• Mark Rochkind creates Source Code Control System
(SCCS) in 1972• Walter Tichy releases Revision Control System (RCS)
in 1982 (still actively maintained)• CVS introduced in 1986 (handles editing multiple files
at once)• Commercial systems: ClearCase, VSS and Perforce
Revision Control Systems (cont)
• Subversion (SVN) came out in 2000. Designed to be mostly compatible with existing CVS projects.– Offers atomic commits (CVS did not)
– Keeps track of file renames and moves– Branching / Tagging is expensive (copies all files)– Tags are modifiable
Revision Control Systems (cont)
• Git introduced in 2005– Linux kernel used BitKeeper (commercial
software) because it was free for OSS– Bitkeeper started charging, so Linus Torvalds
wrote a compatible program (Git)• Mercurial (similar to Git) was also created
because of the BitKeeper license change
Features of Git
• Git has a strong emphasis on non-linear development
• Branching and merging is easy• Auditing of history– If the code in a commit changes, the SHA-1 changes– Once published, it prevents history changes without
people noticing• Distributed Development is the #1 selling point
Git 101
• Setup central “blessed” repository– Each developer downloads a copy– Developer can do local development without
affecting other developers• Branching is cheap– git checkout -b branch_name
Getting started with Git
• mkdir test_app• cd test_app• vi hello_world.rb
#!/usr/bin/env rubyputs “Hello World”
• git init .• git status• git add hello_world.rb• git commit –m ‘Added hello_world.rb’
Github
• Github.com is a website that hosts Git repos• Allows you to share your code with others• Easy Forking / Cloning of existing repos• Provides an easy to use website for hosting
your software projects
Create New Repo on Github
• Visit https://github.com– Login if necessary
• Click New Repository• Enter repository name, description• Click Create repository• Follow directions