SlideShare a Scribd company logo
Git 101

2013/03/12
 @somkiat



             1
Why Version Control ?




                        2
Why Version Control ?
    Collaboration issues !!!




                               3
Version Control
• Local
• Centralize
• Distributed




                                  4
Local




                                                                   5
http://git-scm.com/book/en/Getting-Started-About-Version-Control
Centralize




                                                                   6
http://git-scm.com/book/en/Getting-Started-About-Version-Control
Distributed




                                                                   7
http://git-scm.com/book/en/Getting-Started-About-Version-Control
Version Control
• Local
  – Copy file and folder
• Centralize
  – Control Version System ( CVS )
  – Subversion ( SVN )
• Distributed
  – Git
  – Mercurial Hg
  – Bazaar

                                     8
Why Git ?
1. Distributed => No Single of Failure




                                         9
Why Git ?
2. Simple design :: Less config file




                  VS



                                       10
Why Git ?
       3. Speed :: Work on local




                                                    11
From git real slide ( http://www.codeschool.com )
Who use Git ?




   http://git-scm.com/
                         12
Starting with Git
• Command line interface
• Many Graphic User Interface (GUI)
• Download at http://git-scm.com




                                      13
Git Help
 $ git help




              14
Git Help
$ git help <command>




                       15
Git Setting
                   $ git config <name> <value>


•   $ git config   --global user.name “Your name”
•   $ git config   --global user.email “Your email”
•   $ git config   --global color.ui true
•   $ git config   --list



                                                      16
Starting your repository
         $ git init




                           17
Starting your repository
         $ git init




                           18
Git work flow




http://git-scm.com/book/en/Getting-Started-Git-Basics   19
Git work flow
• Create file README.txt
  – Start as untracked
• Add file to staging area
  – Ready to take a picture
• Commit change
  – Snapshot on the stage




                                20
Create file README.txt
$touch README.txt
$git status




                    New file and untracked

                                             21
Add file to staging area
$git add README.txt
$git status




                      Staged file

                                    22
Commit change
$git commit –m “Create file README.txt”
$git status




                   Working on branch master


                                              23
TODO
•   Modify file README.txt
•   Create file LICENSE
•   Add both files to staging area
•   Commit change




                                     24
Different way to add
•   git add <list of file>
•   git add –all
•   git add *.txt
•   git add docs/*.txt
•   git add docs/
•   git add “*.txt”



                                    25
Git timeline history
$git log




                     History message



                                       26
Homework
• Learn git with github.com
  – http://try.github.com/




                              27
Next
• Git merge
• Git branch
• Collaboration
  – Git remote
     • Branch
     • Tag
• Git rebase
• History and configuration

                              28

More Related Content

PDF
Advanted git
PPTX
Introduction to Git and Github
PDF
Git in 5 Minutes
PDF
Git in Eclipse
PPTX
Git 101
PDF
Git training with Devaamo
KEY
Helios in Action: Git at Eclipse
PPTX
Git intro hands on windows with msysgit
Advanted git
Introduction to Git and Github
Git in 5 Minutes
Git in Eclipse
Git 101
Git training with Devaamo
Helios in Action: Git at Eclipse
Git intro hands on windows with msysgit

What's hot (20)

PPTX
Git in 10 minutes
PPT
Git and fundamentals
PDF
Version Control with Git
PDF
Introduction to Git
PPTX
PPTX
Git 101
PDF
Git Tutorial I
PPTX
Advanced Git Presentation By Swawibe
ODP
Git, Beginner to Advanced Survey
PDF
Version Control System - Git
PDF
Mini git tutorial
PDF
Git advanced
PDF
Fall18 Git presentation
PPTX
Git and github introduction
ODP
Introduction to Git
PDF
Version control
PDF
Git basics
PPTX
11 git version control
PPTX
Git cli
PPT
Git Introduction
Git in 10 minutes
Git and fundamentals
Version Control with Git
Introduction to Git
Git 101
Git Tutorial I
Advanced Git Presentation By Swawibe
Git, Beginner to Advanced Survey
Version Control System - Git
Mini git tutorial
Git advanced
Fall18 Git presentation
Git and github introduction
Introduction to Git
Version control
Git basics
11 git version control
Git cli
Git Introduction
Ad

Viewers also liked (20)

PPT
Oversættelse af faglitteratur
PPT
PDF
Эквивалентность бумажных и электронных документов
PDF
Законодательство о свободе доступа к государственной информации: последствия ...
PDF
В достаточной ли мере развивается законодательная и нормативно-правовая база ...
PPT
Flipbook Steve Jasa Dd07081
PDF
Спасение документов из-под обломков рухнувшего здания Кёльнского архива
PPS
General Colin Powell On Leadership
PPS
Sharks Love
PPT
The Windsurfing Trip
PPT
Where Is Carbon Jacobo
PDF
Проблемы архивного хранения документов на бумажных и электронных носителях
PDF
Programming 101
PDF
д-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES Trust
PPT
Where Is Carbon Agustin
PPT
最簡單的相機
PDF
Aht Durango
PDF
Современные идеи и опыт в области государственного управления: Межведомственн...
PPTX
PROEXPOSURE: pushing female perspectives
PDF
Проблемы реализации проектов СЭД
Oversættelse af faglitteratur
Эквивалентность бумажных и электронных документов
Законодательство о свободе доступа к государственной информации: последствия ...
В достаточной ли мере развивается законодательная и нормативно-правовая база ...
Flipbook Steve Jasa Dd07081
Спасение документов из-под обломков рухнувшего здания Кёльнского архива
General Colin Powell On Leadership
Sharks Love
The Windsurfing Trip
Where Is Carbon Jacobo
Проблемы архивного хранения документов на бумажных и электронных носителях
Programming 101
д-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES Trust
Where Is Carbon Agustin
最簡單的相機
Aht Durango
Современные идеи и опыт в области государственного управления: Межведомственн...
PROEXPOSURE: pushing female perspectives
Проблемы реализации проектов СЭД
Ad

Similar to Git 101 for_tarad_dev (20)

PPT
Git training
PDF
PPTX
github ppt git ppt on git hub to know ab
KEY
Git Tech Talk
ODP
Git: be social
PPT
Git presentation
PPTX
Git basic stanley hsiao 2010_12_15
PDF
Version control and GIT Primer
PDF
Git hub
PPT
Git is a distributed version control system .
PPT
390a gitintro 12au
PPTX
GIT.pptx
PPTX
Git presentation
PPTX
Git training (basic)
PPTX
Getting Started with Git: A Primer for SVN and TFS Users
PPT
GIT-FirstPart.ppt
PDF
Git and Github
KEY
Let's Git this Party Started: An Introduction to Git and GitHub
PPTX
sample.pptx
PPTX
Git walkthrough
Git training
github ppt git ppt on git hub to know ab
Git Tech Talk
Git: be social
Git presentation
Git basic stanley hsiao 2010_12_15
Version control and GIT Primer
Git hub
Git is a distributed version control system .
390a gitintro 12au
GIT.pptx
Git presentation
Git training (basic)
Getting Started with Git: A Primer for SVN and TFS Users
GIT-FirstPart.ppt
Git and Github
Let's Git this Party Started: An Introduction to Git and GitHub
sample.pptx
Git walkthrough

More from Somkiat Puisungnoen (20)

PDF
Next of Java 2022
PDF
Sck spring-reactive
PDF
Part 2 :: Spring Boot testing
PDF
vTalk#1 Microservices with Spring Boot
PDF
Lesson learned from React native and Flutter
PDF
Angular :: basic tuning performance
PDF
Shared code between projects
PDF
Distributed Tracing
PDF
Manage data of service
PDF
RobotFramework Meetup at Thailand #2
PDF
Visual testing
PDF
Cloud Native App
PDF
Wordpress for Newbie
PDF
Sck Agile in Real World
PDF
Clean you code
PDF
SCK Firestore at CNX
PDF
Unhappiness Developer
PDF
The Beauty of BAD code
PDF
React in the right way
Next of Java 2022
Sck spring-reactive
Part 2 :: Spring Boot testing
vTalk#1 Microservices with Spring Boot
Lesson learned from React native and Flutter
Angular :: basic tuning performance
Shared code between projects
Distributed Tracing
Manage data of service
RobotFramework Meetup at Thailand #2
Visual testing
Cloud Native App
Wordpress for Newbie
Sck Agile in Real World
Clean you code
SCK Firestore at CNX
Unhappiness Developer
The Beauty of BAD code
React in the right way

Git 101 for_tarad_dev