An Introduction to Git

Thibaut Démare
LITIS - Université du Havre
February 8th, 2016

Overview

  1. What is Git?
  2. The main commands
  3. Some Git Platforms

What is Git?

The Issues at the Origin of Git

  • You want to have a backup of your files.
  • You want to keep a trace of the evolution of your project.
  • You want to work with colleagues on the same project.
  • You want to try new features or try another structure of an article but you are not sure to keep these changes later.

Git has been designed by the man behind Linux to provide solutions to these problems.

Architecture


Figure 1: Interactions with the Git server

The main commands

The First Command to Know

  • git init
    it is used to create a new repository.
  • git clone an_existing_repository
    it is used to create locally a repository from an existing but distant one.

Add changes

  • git status
    It is used to list files which have changed.
  • git add file_name
    it is used to add a file to a future commit.
  • git commit -m "your commit message"
    it is used to confirm the modifications applied to your files.

Interact with the server

  • git pull
    It is used to get the modifications published by other.
  • git push
    it is used to publish your own modifications and make them available to your co-workers.

Some Git Platforms

Platforms

Thank you for your attention !



Any questions?

thibaut.demare@univ-lehavre.fr