Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Version control systems

Version control systems

This presentation discusses version control systems in general and Git in particular. It covers a brief history of VCSs followed by basics of Git, Git terminology and commands. This presentation is part of the tutorial series for SEIP (Software Engineering in Practice) course (2018) at AUEB.


Tushar Sharma

February 21, 2018


  1. Software Engineering in Practice Version Control Systems

  2. A typical scenario

  3. Version control systems – Why? • Clutter free workspace (no

    numbered files) • Avoids duplication • Backup and restore • Synchronization • Undo • Track changes (with messages) • Track ownership • Merging and branching • Collaboration
  4. VCS – History (1) Gen. Networking Operations Concurrency Examples 1

    None One file at at time Locks SCCS, RCS 2 Centralized Multi-file Merge before commit Subversion, TFS, CVS 3 Distributed Change- sets/ snapshot Commit before merge Git, Bazaar, Mercurial http://ericsink.com/vcbe/html/history_of_version_control.html
  5. VCS – History (2) http://www.iiis.org/cds2011/cd2011imc/iceme_2011/paperspdf/fb394vz.pdf SCCS by Marc J. Rochkind

    at BellLabs 1972 1980 RCS by Walter F. Tichy at Purdue Univ. 1985 CVS by Dick Grune at Vrije University 1992 ClearCase by Atria (later IBM) 1994 Visual SourceSafe by Microsoft 2000 Subversion by Karl Fogel 2005 Git by open-source community TFS by Microsoft
  6. Let’s understand Git

  7. Git basics (1) • Snapshots (and not change-sets) CVS, Subversion,

    and others Git
  8. Git basics (2) • Local operations • Majority of operations

    are local - commit, log, branch... • Integrity • Impossible to change contents without Git knowing about it. • 40 char SHA-1 hash
  9. Git basics (3) • Stages • Committed • Staged •

    Modified http://rogerdudler.github.io/git-guide/ https://git-scm.com/book/en/v2/Getting-Started-Git-Basics
  10. Git Terminology

  11. Terminology Repository The database storing the project files.

  12. Terminology Commit (or check-in) The act of saving a working

    copy (a workfile or set of workfiles) to your repository.
  13. Terminology Head (or tip) The latest version in a branch.

  14. Terminology Branch A branch is a parallel version of a

    repository. http://rogerdudler.github.io/git-guide/
  15. Terminology Clone A clone is a copy of a repository

    that lives on your computer instead of on a website's server.
  16. Terminology Diff A diff is the difference in changes between

    two commits, or saved changes.
  17. Terminology Fork A fork is a personal copy of another

    user's repository that lives on your account.
  18. Terminology Merge Merging takes the changes from one branch (in

    the same repository or from a fork), and applies them into another.
  19. Terminology Pull Pull refers to when you are fetching in

    changes and merging them.
  20. Terminology Pull Request Pull requests are proposed changes to a

    repository submitted by a user and accepted or rejected by a repository's collaborators.
  21. Terminology Push Pushing refers to sending your committed changes to

    a remote repository such as GitHub.com.
  22. Let’s get our hands dirty

  23. Installation https://git-scm.com/downloads

  24. Commands Create a repository git init <project-name>

  25. Commands Clone a repository git clone <url>

  26. Commands Add a file to repository git add <file>

  27. Commands Commit git commit –m “description”

  28. Commands Pull changes git pull

  29. Commands Push changes git push <origin> <branch>

  30. Commands Merge changes git merge <branch>

  31. Commands See log git log

  32. Commands See git repository status git status

  33. Let’s get our hands dirty … actually

  34. Now what? … Practice https://try.github.io/levels/1/challenges/1

  35. Assignment Taksidiotis – Athens travel guide by the Greeks Tasks

    • Clone the repo – git@github.com:tushartushar/taksidiotis.git • Add an interesting place (such as museum, bar, or restaurant), activity (walking tour, or food/wine-tasting tour), or anything interesting for a tourist to the guide.md file • Contribute to at least 3 categories • The important thing is – you, as a Greek, are recommending it • You may change/modify text added by others • Try to arrange the entries in categories (such as ‘Tour’, ‘Food’, ‘History’, and ‘Islands’) • Commit your changes • Push to the GitHub repo • Deadline – 5 PM, Feb 28, 2018
  36. Courtesy: spikedmath.com Thank you