Beginning git

Preview:

DESCRIPTION

 

Citation preview

Beginning git@ghosTM55

Sunday, November 20, 11

Outline

What is git?

How do we use git?

Basic commands

Collaboration on a powerful platform

Sunday, November 20, 11

Version Control System

rcs

subversion

git

Sunday, November 20, 11

Killing features

Fully distributed

Fast

Local

Secure

Strong support for non-linear development

Snapshots, not differences

Sunday, November 20, 11

When to use git?

Work on a project together

Backup small files

Sunday, November 20, 11

Get a git repo

git init

git clone

Sunday, November 20, 11

Basic commands

git status

git diff

git commit

git push

git pull

Sunday, November 20, 11

.gitignore

*.bak

!emacs.bak

lib/

build/*.o

Sunday, November 20, 11

File changes

git mv

git rm

Sunday, November 20, 11

View commit history

git log

git log -p -2

git log --pretty=oneline --graph

git log --pretty=format:”%format”

git log --since=2.weeks

Sunday, November 20, 11

Undoing things

git commit --amend

git reset

Sunday, November 20, 11

Branch

git branch

git branch branch_name

git checkout branch_name

git merge branch_name

git branch -d branch_name

Sunday, November 20, 11

Teamwork time

git clone

git remote add remote_name remote_address

git pull remote_name

git push remote_name branch_name

Sunday, November 20, 11

github

Most popular project hosting service

Lots of great projects and developers

It inspires developers to do better

Sunday, November 20, 11

In China?

0Sunday, November 20, 11

Here we go

Sunday, November 20, 11

Why?

Promote Chinese opensource projects

Promote Chinese opensource communities

Easier for newbies take part in projects

Easier for enterprises to hire developers

Easier for all of you get tech info

Why NOT?

Sunday, November 20, 11

We’re still young

Let’s work harder for tomorrow

THX :)

Sunday, November 20, 11

Recommended