git session 1

45
+ Source Code Management

Upload: hassan-khan

Post on 09-Jul-2015

36 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Git session 1

+

Source Code Management

Page 2: Git session 1

+What will we learn ?

Any thing that lies between managing our code efficiently

locally and on the server

Page 3: Git session 1

+Why Git ?

Page 4: Git session 1

+Why Git ?

Because we use it here

in Cygnis

Page 5: Git session 1

+Learning Strategy

We will start from very basic

Use a practical approach

More focus on the problems that we face on daily bases

Depending on your response we can delve into the underlying

architecture of git, how git manages/saves/manipulates our

repository/changes/commits.

Page 6: Git session 1

+Prerequisites :

You need to be a CYGNET

Page 7: Git session 1

+Goal of these sessions

Current Practice:

MAGIC

Page 8: Git session 1

+Goal of these sessions

We will try to learn that magic stuff

Magic

Page 9: Git session 1

+Version Control System

Page 10: Git session 1

+Version Control System

Management of changes in a computer programs, website,

and other information(more widely called a project in our

environment, we are more comfortable with the project).

Definition

Page 11: Git session 1

+Version Control System

Revision Control == Version Control == Source Control

More common term = Version Control System = VCS

Common Terms

Page 12: Git session 1

+Version Control System

Versioning of your files

Revert file/files back to a previous state

Revert the entire project back to a previous state,

Compare changes overtime,

See who last modified something that might be causing

problem

and more.

Capabilities

Page 13: Git session 1

+Version Control System

Word processing applications/ Spread sheets e.g MS Office,

Google Doc

e.g:

Page 14: Git session 1

+Version Control System

VCS saved differences as patches, i.e in the form of differences

between two files.

How do they manage changes

Page 15: Git session 1

+Two Types of VCS’Central

Page 16: Git session 1

+Two Types of VCS’Distributed

Page 17: Git session 1

+Central vs Distributed

Single central copy of your project on the server

Programmer commit a change to this central repository

You need to be connected to the server to push your changes

Other programmers working on the same project can see the

change committed

Central

Page 18: Git session 1

+Central vs Distributed

Common operations such as commits, viewing history and

reverting changes are fast because there is no need to

communicate with a central server.

Each working copy effectively functions as a remote backup of

the codebase and of its change-history, providing inherent

protection against data loss.

Distributed

Page 19: Git session 1

+Some other DVCSs

BitKeeper is no open source

Page 20: Git session 1

+Warning!!! Git Ahead!

Information Manager from Hell

Page 21: Git session 1

+What Git actually is?

Distributed Version Control System

Open source

Exists on each and every platform

Page 22: Git session 1

+Brief History of Git

Designed and created by Linus Torvalds (the creator of linux

operating system)

Started Development on 3rd April 2005

First commit 7th April 2005

First Project : Linux Kernel with 6.7 million lines of code

Page 23: Git session 1

+Some more praise for Git

Facilitate distributed development

Scale to handle thousand of developers

Perform quickly and efficiently

Maintain integrity and trust

Enforce accountability

Immutability

Answer to ‘Why Git?’

Page 24: Git session 1

+Some more praise for Git

Atomic transactions

Support and encourage branched development

Complete repositories

Clean internal design

Answers to ‘Why Git?’

Page 25: Git session 1

+Git : Practical Approach

Cygwin based Git

Native version : msysGit

Installing Git on Windows

Page 26: Git session 1

+Git : Practical Approach

http://git-scm.com/download/win

Latest git installer is downloaded

Run the installer to install Git

It will install Git Bash and Git GUI

We will use Git Bash mainly and Git GUI or any other GUI tool

to visually see our changes

Installing Git on Windows

Page 27: Git session 1

+Git : Practical ApproachInstalling Git on Windows

Page 28: Git session 1

+Git : Practical ApproachInstalling Git on Windows

Page 29: Git session 1

+Git : Practical ApproachInstalling Git on Windows

Page 30: Git session 1

+Git : Practical ApproachInstalling Git on Windows

Page 31: Git session 1

+Git : Practical ApproachInstalling Git on Windows

Page 32: Git session 1

+Git : Practical ApproachInstalling Git on Windows

Page 33: Git session 1

+Git : Practical ApproachInstalling Git on Windows

Page 34: Git session 1

+Git : Practical ApproachInstalling Git on Windows

Page 35: Git session 1

+The Git CycleProject

Page 36: Git session 1

+The Git CycleFiles

Page 37: Git session 1

+Git : Getting the hands dirty

Page 38: Git session 1

+Command Line Interface

Page 39: Git session 1

+Git : Initial SetupIdentify yourself

Page 40: Git session 1

+Git: Ready, set, repo up!

Page 41: Git session 1

+Git: A word about .git

Page 42: Git session 1

+Git: Tracking Files

Page 43: Git session 1

+Don’t you like VIM???… :SChanging the default editor

Page 44: Git session 1

+Don’t you like VIM???… :SChanging the default editor

Page 45: Git session 1

+That’s a lot of Git for today!