introduction to git and github

44

Click here to load reader

Upload: somkiat-puisungnoen

Post on 11-May-2015

2.741 views

Category:

Technology


14 download

TRANSCRIPT

Page 1: Introduction to Git and Github

Introduction toGit and GitHub

2012/02/02

Page 2: Introduction to Git and Github

Git 101

• Distributed Version Control Systemo Design for speed and efficiency

• Open Source 

Page 3: Introduction to Git and Github

Git 101

• Distributed Version Control Systemo Designed for speed and efficiency

• Open Source 

Page 4: Introduction to Git and Github

git-scm.com

Page 5: Introduction to Git and Github

Git 101

• Distributed Version Control Systemo Designed for speed and efficiency

• Open Source 

Page 6: Introduction to Git and Github

Version Control

• ??• ??

Page 7: Introduction to Git and Github

Version Control

• Visual Source Safe• CVS ( Concurrent Version System )• SVN ( SubVersion )• Bazaar • Mercurial ( hg )• Git 

Page 8: Introduction to Git and Github

Git 101

• Distributed Version Control Systemo Designed for speed and efficiency

• Open Source 

Page 9: Introduction to Git and Github

Local Version Control

Page 10: Introduction to Git and Github

Centralized Version Control

Page 11: Introduction to Git and Github

Centralized Version Control :: Cons

Page 12: Introduction to Git and Github

Distributed Version Control

Full mirror Full mirror

Page 13: Introduction to Git and Github

Distributed Version Control

Almost everything is local.

Page 14: Introduction to Git and Github

Distributed Version Control

Fast, backup andWork offline

Page 15: Introduction to Git and Github

Git 101

• Distributed Version Control Systemo Designed for speed and efficiency

• Open Source 

Page 16: Introduction to Git and Github

Linux Team

FastSimpleParallel branch ( 1,000+ )Fully distributedHandle large project such as  Linux kernel

Page 17: Introduction to Git and Github

Who use git ?

Page 18: Introduction to Git and Github
Page 19: Introduction to Git and Github
Page 20: Introduction to Git and Github

Hello Git

Page 21: Introduction to Git and Github

Install git on Windows

• Download from http://code.google.com/p/msysgit

Page 22: Introduction to Git and Github

Create User and Password

$ git config --global user.name "SomkiatP"$ git config --global user.email  "[email protected]"

Page 23: Introduction to Git and Github

Create Repository

$ git init

Page 24: Introduction to Git and Github

View repository

$ tree -a

Download tree for win32 at http://sourceforge.net/projects/gnuwin32/files/tree/ 

Page 25: Introduction to Git and Github

Add new file

$ touch test_1.txt$ git add test_1.txt$ git commit -m 'First commit'

Page 26: Introduction to Git and Github

View repository$ tree -a

Page 27: Introduction to Git and Github

Help me$ git help

Page 28: Introduction to Git and Github

Help me$ git help <command>$ git help init

Page 29: Introduction to Git and Github

Clone

Now, We don't have Git Server.

But we have GitHub.com

Page 30: Introduction to Git and Github

GitHub.com

Page 31: Introduction to Git and Github

Welcome to GitHub

• Register and login• Ready to use ....

Page 32: Introduction to Git and Github

Create new repository

Page 33: Introduction to Git and Github

After created,Everything you should know and do

Page 34: Introduction to Git and Github

Setting git before using github

• Generate SSH key in git ( Local )• $ssh-keygen -t rsa -C "[email protected]"

Page 35: Introduction to Git and Github

Copy data in file id_rsa.pub to github

Page 36: Introduction to Git and Github

Manage data with github

• $ git config --global user.name "up1"• $ git config --global user.email [email protected]• $ git init• $ touch README• $ git add README• $ git commit -m 'first commit'• $ git remote add origin [email protected]:up1/----

hello_tarad.git• $ git push -u origin master

Page 37: Introduction to Git and Github

Manage data with github ( demo )

Page 38: Introduction to Git and Github

Manage data with github (demo)

Page 39: Introduction to Git and Github

See result at github, Work !!

Page 40: Introduction to Git and Github

Come back to Clone repository

• Copy URL of repository from github

Page 41: Introduction to Git and Github

Clone repository

• $ git clone https://[email protected]/up1/----hello_tarad.git

Required password of gitbub

Page 42: Introduction to Git and Github

Good Resource for beginner

Page 43: Introduction to Git and Github

progit.org

Page 44: Introduction to Git and Github

https://github.com/opendream/progit