Top Banner
GIT and its Extension Training Eric Guo 2012-03-27
30

Git extension-training

Jul 12, 2015

Download

Technology

Eric Guo
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Git extension-training

GIT and its Extension Training

Eric Guo

2012-03-27

Page 2: Git extension-training

Training Agenda

• Version Control History, GIT Design Goal

• GIT Extension Installation and Setup

• GIT Concept and Terminology

• GIT Daily Usage in SVN way

• Create your own GIT repo (local &

remote)

• New GIT feature and further more manual

Page 3: Git extension-training

Version Control History

manually keep track of versions of code! (1960s)

keep lots of versions in one file! (1972, SCCS)

You can each have your own copy checked out! (1982,

RCS)

version multiple files at once! (1986, CVS, atomic by

Subversion 2000)

shared repository can be on a remote machine! (1994,

CVS with )

open source version control hosting! (1999,

SourceForge)

no central repository! (2005, GIT)

When you checkout that’s a fork too, and you can do

that in public! (2008, GIThub)

http://www.flourish.org/blog/?p=397

Page 4: Git extension-training

GIT & GitHub History

Torvalds wanted a distributed system that he could

use like BitKeeper, but none of the available free

systems met his needs, particularly his performance

needs. From an email he wrote on 7 April 2005 while

writing the first prototype.

GitHub is a web-based hosting service for software

development projects that use the Git revision

control system. GitHub offers both commercial plans

and free accounts for open source projects.

According to the Git User's Survey in 2009, GitHub is

the most popular Git hosting site.

Page 5: Git extension-training

GIT Design Goal

• Take CVS as an example of what not to do; if in

doubt, make the exact opposite decision.

• Support a distributed, BitKeeper-like workflow

• Very high performanc and strong safeguards

against corruption, either accidental or malicious

Page 6: Git extension-training

GIT Extension Design Goal

• GitExtensions is a shell extension, a Visual Studio

2008 / 2010 plug-in and a standalone GIT

repository tool.

• Great tools enable you think and work in Unix style

gradually

Page 7: Git extension-training

GIT Extension Installation – All User

http://code.google.com/p/gitextensions/ (download

URL)

Page 8: Git extension-training

GIT Extension Installation – Both

Page 9: Git extension-training

GIT Extension Installation - Integration

Page 10: Git extension-training

GIT Extension Installation - PuTTY

Page 11: Git extension-training

GIT Extension Installation - KDiff3

Page 12: Git extension-training

GIT Extension Installation – MsysGIT

Page 13: Git extension-training

GIT Extension Installation – Bash only

Page 14: Git extension-training

GIT Extension Installation – cross-platform

Page 15: Git extension-training

GIT Extension Setup

GIT Extension Settings Settings to fill:

User Name

eMail

Page 16: Git extension-training

GIT Generate SSH Key

Page 17: Git extension-training

GIT Email your Public key to Admin

• Copy selection text

and email to your

Admin

• Save private key

because you need

private key to login

latter

• Loss private key

need regenerate

private key and resent

public key to Admin

Page 18: Git extension-training

GIT clone your first repositories to test

Repository to clone: gitolite@cvpscmip01:testing

Page 19: Git extension-training

GIT Commit your first change to test

Page 20: Git extension-training

GIT Daily Usage in SVN way

Clone (SVN Checkout)

Commit (in Local!)

Push (SVN Commit)

Pull (SVN Update All)

gitK (SVN History)

Page 21: Git extension-training

GIT Concept

and

Terminology

Page 22: Git extension-training

gitK – a commit viewer for git

Page 23: Git extension-training

GIT Key Sales Point

• Very fast and user friendly

• Source Code Repository is

distributed, isolated, history

complete

• All action can run in Local except

pull and push

• Submit and rollback always success

(until pull and push)

• Can fix last submit very easily

Page 24: Git extension-training

Create your GIT repository in GIT Extension

Open Repopsitory Your not GIT init yet folder Initialize Repository

Page 25: Git extension-training

Add .gitignore for VS.NET intermediate files

Forgot any add ignore file and pattern in Subversion, now it’s a One-click only!But don’t forgot to add ignore files

when you initial the repository!

Page 26: Git extension-training

Commit initial version of files

Page 27: Git extension-training

Push your repository to CVPSCMIP01

You can to put any repository to: (no need inform GIT admin!)

gitolite@cvpscmip01:/usr/[yourname]/[your_repository_name]

Page 28: Git extension-training

Your repository is also visible at Web!

http://cvpscmip01/usr/eric/MTtest-Assistant.git

Suggestion:

1. Work as own at first in your usr folder. (No need to inform GIT Admin)

2. Rise your project to root folder if it is company widely used and relatively stable. (Need GIT

Admin help)

3. Old Subversion project will moved to root folder by GIT Admin already

Page 29: Git extension-training

More GIT tricks need SSH and console now

Setting more description for your own repository:

6749@SHE127731 /d/git

$ echo "A semi-auto MES Yield Limit Batch setting tools used in SPAS 125-001" | ssh

gitolite@cvpscmip01 setdesc usr/eri

c/YieldLimits-Change

Enter passphrase for key '/c/Users/6749/.ssh/id_rsa':

New description is:

A semi-auto MES Yield Limit Batch setting tools used in SPAS 125-001

Page 30: Git extension-training

More document and essay about GIT

Git Extensions User Manual (in your

hard drive after install GIT Extension)

Pro GIT (Chinese)

GIT Magic (Chinese)

《Git权威指南》

Things we not mentioned:

GIT command line

Branch, Merge, Rebase, Cherry Pick