Git & Gitlab

Özgün Bal

Contents

  • Version Control Systems
  • Git vs SVN
  • Basic Git Concepts
  • Gitlab and Usage

Version Control Systems

  • Allows developers to work simultaneously
  • Does not allow overwriting each other's changes
  • Maintains a history of every version

Centralized Version Control System (CVCS)

Central server stores all files and enables team collaboration (Subversion)

Distributed Version Control System (DVCS)

Mirroring the full repository & offline usage (Git)

Git 

  • master
  • local repository
  • fast
  • offline (commit, branch)
  • less management
  • Not good with binary files
  • No revision numbers
  • Open source friendly

SVN

  • trunk
  • only working copy (specific revision)
  • relatively slow
  • needs to be online
  • access permission handling
  • no problem with binary files
  • revision numbers

Basic Git Concepts

  • git init (initialize the repo)
  • git add training.md (add to staging area)
  • git commit -m "Added training.md" (commit with message)
  • git log (commit history of the repo)

Basic Git Concepts cont.

  • git clone (create copy of remote repo on local)
  • git pull (get latest version of remote repo)
  • git push (send your latest version of local repo to remote)

Basic Git Concepts cont.

What is Gitlab?

Gitlab is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere

Gitlab.Com (Github) Capabilities

  • Open source project maintaining
  • Contribution to projects
  • Online portfolio of your projects / skills
  • Tracking up-to-date software technologies
  • Visualization tools for commits, code frequency etc.
  • Code review
  • Continuous integration
  • Deploy static websites with gitlab-pages 

Gitlab.com (Github) Concepts

  • Fork: Copying remote repository to yourself
    • e.g: fibabanka/SymphonyWeb to ozgunbal/SymphonyWeb
  • Merge (pull) request: Sending new feature/bugfix etc. to main project's repository from your forked remote repository
  • You can do branching, committing and merging from Gitlab via GUI.

Gitlab Community Edition 

  • Gitlab.com like server in specific machine in your local environment
  • Open source software
  • Free of charge
  • By adding Gitlab CI runners, taking advantage of continuous integration
  • Allow storing personal projects for users (public/private)
  • Access management for repositories can be customized
  • Administration can be done on web application

Thank you for listening!

Git & Gitlab

By Özgün Bal

Git & Gitlab

  • 57