18
Beginning git @ghosTM55 Sunday, November 20, 11

Beginning git

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Beginning git

Beginning git@ghosTM55

Sunday, November 20, 11

Page 2: Beginning git

Outline

What is git?

How do we use git?

Basic commands

Collaboration on a powerful platform

Sunday, November 20, 11

Page 3: Beginning git

Version Control System

rcs

subversion

git

Sunday, November 20, 11

Page 4: Beginning git

Killing features

Fully distributed

Fast

Local

Secure

Strong support for non-linear development

Snapshots, not differences

Sunday, November 20, 11

Page 5: Beginning git

When to use git?

Work on a project together

Backup small files

Sunday, November 20, 11

Page 6: Beginning git

Get a git repo

git init

git clone

Sunday, November 20, 11

Page 7: Beginning git

Basic commands

git status

git diff

git commit

git push

git pull

Sunday, November 20, 11

Page 8: Beginning git

.gitignore

*.bak

!emacs.bak

lib/

build/*.o

Sunday, November 20, 11

Page 9: Beginning git

File changes

git mv

git rm

Sunday, November 20, 11

Page 10: Beginning git

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

Page 11: Beginning git

Undoing things

git commit --amend

git reset

Sunday, November 20, 11

Page 12: Beginning git

Branch

git branch

git branch branch_name

git checkout branch_name

git merge branch_name

git branch -d branch_name

Sunday, November 20, 11

Page 13: Beginning git

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

Page 14: Beginning git

github

Most popular project hosting service

Lots of great projects and developers

It inspires developers to do better

Sunday, November 20, 11

Page 15: Beginning git

In China?

0Sunday, November 20, 11

Page 16: Beginning git

Here we go

Sunday, November 20, 11

Page 17: Beginning git

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

Page 18: Beginning git

We’re still young

Let’s work harder for tomorrow

THX :)

Sunday, November 20, 11