Synopsis of revision control basics and Git.
- version control
- source control
- software configuration management
What is it?
A way to track changes to computer files, often with the capability of collaboration. It is used in software coding, word processors like google docs, wiki’s, content management, CAD, etc. It is basically a more advanced “undo” button. Most often used with human readable files but can be used with other types too.
Distributed vs Client-Server models
Collaborative work on the same file. How can two people open the file at the same time and work on it? This capibily has only just been introduced: google docs, google wave, the upcoming gedit, etc. So how has it traditionally been handled?
- Client server
- All the files are stored on a central server and must be either checked out leaving the file locked to others or many people can check them out and the changes must be merged after the edits. Merging is difficult with files that aren’t basic text.
- Everyone’s copy is a repository that can be copied by others. No central server, so the operations on the files are much faster.
- Wikipedia’s list: http://en.wikipedia.org/wiki/List_of_revision_control_software
Features (from Version Control with Git by Jon Leoliger)
- Distributed development
- For thousands of developers
- Fast performance
- Data integrity
- Atomic transactions
- Encourage branched development
- Complete repositories
- Clean internal design
- Free, as in freedom
- Github - Social coding website base base on Git
- Gitweb - Show your git repo to the world from your server
- Gitwiki - The Git project wiki
- Gitmagic - Tutorial and documentation
- Git Webcast by Scott Chacon – Introductiong to Git
- Version Control with Git by Jon Leoliger - Great book
- Cheat sheets: One, Two, Three
- A visual git reference
- Object types: Blobs, Trees, Commits, Tags
- SHA1 Hash
- The index
- Init and Clone
- Remote Repositories
- Three basic startup commands: init, add, commit
- find ., .git/objects
- commit, commit -am “message”
- ls-files -s, –stage
- cat-file -p <HASH> – shows what the file is
- log, log -1 –pretty=oneline
- rm, mv
Git + Matlab
- Simply type: system(‘command’) where ‘command’ is the git command you would type in the shell.