Version Controlling With Git

Preview:

Citation preview

The fast version control system

What is Git?

Git is a free and open source distributed version control system designed for speed and efficiency

What is Version Control?

Local Version Control Systems

Centralized Version Control Systems

Distributed Version Control Systems

Git Key Concepts

Storage : Snapshots, Not Delta Storage

Almost Every Operation is Local

● Uses the local database for it’s operations● No network latency overhead● Can commit locally and upload later when

you get a network connection

Data Integrity

● Each file and commit is checksummed for integrity

● Uses SHA-1 hash● This functionality is built into Git at the lowest

levels and is integral to its philosophy● Impossible to change the contents of any file

or directory without Git knowing about it

Support for Non-linear Development

● Git encourages you to have multiple branches (even thousands)

● A branch is just a pointer to a commit● Enables you to do things like:

○ Frictionless Context Switching○ Role-based codelines○ Feature based workflow○ Disposable experimentation

Git Only Adds Data

● Nearly all the actions in Git adds data to the Git database

● Once you commit a snapshot into Git, it is very difficult to lose

● Hence users can experiment without the danger of screwing things up

Performance Benchmarks

source https://git-scm.com

Performance Benchmarks contd ...

source https://git-scm.com

Git on the Server

● Hosted Git○ GitHub○ BitBucket

● DIY Git server○ GitLab○ GitWeb○ Gitolite○ Gitosis

Resources & Tools

A List of Tools

● TortoiseGit● SmartGit● GitEye● EGit

Git Resources

● http://git-scm.com● https://www.atlassian.com/git● http://gitready.com● https://try.github.io

that’s it !

Recommended