Concurrent Version Control Systems

Sometimes we need to keep a history of changes

Sometimes we need to work with others

  • share a collection of files with your team or other external contributors
  • merge changes done by others
  • ensure that nothing is accidentally overwritten
  • know who you must blame when something is broken…

Sometimes we need to branch our project

  • You can have:
    • a main branch
    • a maintainance branch (to provide bugfixes in older releases)
    • a development branch (to make disruptive changes)
    • a release branch (to freeze code before a new release)
  • Thus, you may need something to:
    • handle multiple branches concurrently
    • merge changes from a branch into another one

Git and Github

  • Git is a version control software developed in 2005 by Linus Torvalds (who also created Linux!)
    • Open source!
    • The files are stored in a repository, which you can simply think of as a directory containing files (or other directories) related to a single “project”.
    • Git takes “snapshots” of your files each time you commit changes
    • You can use either by command-line or by GUI (see alternatives here)
  • Github is a web based Git repository hosting service
    • it is also a social network where people can collaborate with each other in projects
    • for example, it is also possible to give feedback to the developer by creating a specific “issue” that can be used to report for example a bug that was found in the software, or suggest new features
    • publicly available repositories can also be downloaded to your own local computer, where you can start modifying the codes for your own purpose (which is called “forking”).
      • however, you should always check and follow the license terms of the project, which that basically tells you what you can do (and what not) with the codes that are shared. Usually there might be some limitations for commercial use of the codes, for example.
    • documentation: each repository (and possibly its subfolders) includes a file called README.md that by default is the front-page of the given repository in GitHub, and shows a basic documentation and how to use the software.

Example: Linux kernel

  • Developed with Git
  • about 10000 changesets in each new version (every 2 or 3 months)
  • 1000+ unique contributors

Working with Git

  • A excellent git guide can be found at this blog post and this web page.
    • We will make a demonstration “in paper” now in classroom.
  • We will practice this in classroom by making changes to a Python software in our example repository.
    • First, register at Github and install Github Desktop!