SlideShare a Scribd company logo
1 of 28
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

What's hot (20)

Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Git and fundamentals
Git and fundamentalsGit and fundamentals
Git and fundamentals
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git
GitGit
Git
 
Git 101
Git 101Git 101
Git 101
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Advanced Git Presentation By Swawibe
Advanced Git Presentation By SwawibeAdvanced Git Presentation By Swawibe
Advanced Git Presentation By Swawibe
 
Git, Beginner to Advanced Survey
Git, Beginner to Advanced SurveyGit, Beginner to Advanced Survey
Git, Beginner to Advanced Survey
 
Version Control System - Git
Version Control System - GitVersion Control System - Git
Version Control System - Git
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 
Git advanced
Git advancedGit advanced
Git advanced
 
Fall18 Git presentation
Fall18 Git presentationFall18 Git presentation
Fall18 Git presentation
 
Git and github introduction
Git and github introductionGit and github introduction
Git and github introduction
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Version control
Version controlVersion control
Version control
 
Git basics
Git basicsGit basics
Git basics
 
11 git version control
11 git version control11 git version control
11 git version control
 
Git cli
Git cliGit cli
Git cli
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
 

Viewers also liked

Oversættelse af faglitteratur
Oversættelse af faglitteraturOversættelse af faglitteratur
Oversættelse af faglitteraturguestfe0f0b
 
Эквивалентность бумажных и электронных документов
Эквивалентность бумажных и электронных документовЭквивалентность бумажных и электронных документов
Эквивалентность бумажных и электронных документовNatasha Khramtsovsky
 
Законодательство о свободе доступа к государственной информации: последствия ...
Законодательство о свободе доступа к государственной информации: последствия ...Законодательство о свободе доступа к государственной информации: последствия ...
Законодательство о свободе доступа к государственной информации: последствия ...Natasha Khramtsovsky
 
В достаточной ли мере развивается законодательная и нормативно-правовая база ...
В достаточной ли мере развивается законодательная и нормативно-правовая база ...В достаточной ли мере развивается законодательная и нормативно-правовая база ...
В достаточной ли мере развивается законодательная и нормативно-правовая база ...Natasha Khramtsovsky
 
Flipbook Steve Jasa Dd07081
Flipbook Steve Jasa Dd07081Flipbook Steve Jasa Dd07081
Flipbook Steve Jasa Dd07081jaspang
 
Спасение документов из-под обломков рухнувшего здания Кёльнского архива
Спасение документов из-под обломков рухнувшего здания Кёльнского архиваСпасение документов из-под обломков рухнувшего здания Кёльнского архива
Спасение документов из-под обломков рухнувшего здания Кёльнского архиваNatasha Khramtsovsky
 
General Colin Powell On Leadership
General Colin Powell On LeadershipGeneral Colin Powell On Leadership
General Colin Powell On Leadershipmeade
 
Проблемы архивного хранения документов на бумажных и электронных носителях
Проблемы архивного хранения документов на бумажных и электронных носителяхПроблемы архивного хранения документов на бумажных и электронных носителях
Проблемы архивного хранения документов на бумажных и электронных носителяхNatasha Khramtsovsky
 
д-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES Trust
д-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES Trustд-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES Trust
д-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES TrustNatasha Khramtsovsky
 

Viewers also liked (20)

Oversættelse af faglitteratur
Oversættelse af faglitteraturOversættelse af faglitteratur
Oversættelse af faglitteratur
 
Italy Trip II
Italy Trip IIItaly Trip II
Italy Trip II
 
Эквивалентность бумажных и электронных документов
Эквивалентность бумажных и электронных документовЭквивалентность бумажных и электронных документов
Эквивалентность бумажных и электронных документов
 
Законодательство о свободе доступа к государственной информации: последствия ...
Законодательство о свободе доступа к государственной информации: последствия ...Законодательство о свободе доступа к государственной информации: последствия ...
Законодательство о свободе доступа к государственной информации: последствия ...
 
В достаточной ли мере развивается законодательная и нормативно-правовая база ...
В достаточной ли мере развивается законодательная и нормативно-правовая база ...В достаточной ли мере развивается законодательная и нормативно-правовая база ...
В достаточной ли мере развивается законодательная и нормативно-правовая база ...
 
Burgerinitiatieven versterken - Emilie Van Daele
Burgerinitiatieven versterken - Emilie Van DaeleBurgerinitiatieven versterken - Emilie Van Daele
Burgerinitiatieven versterken - Emilie Van Daele
 
Flipbook Steve Jasa Dd07081
Flipbook Steve Jasa Dd07081Flipbook Steve Jasa Dd07081
Flipbook Steve Jasa Dd07081
 
Спасение документов из-под обломков рухнувшего здания Кёльнского архива
Спасение документов из-под обломков рухнувшего здания Кёльнского архиваСпасение документов из-под обломков рухнувшего здания Кёльнского архива
Спасение документов из-под обломков рухнувшего здания Кёльнского архива
 
General Colin Powell On Leadership
General Colin Powell On LeadershipGeneral Colin Powell On Leadership
General Colin Powell On Leadership
 
Gedeelde waarde creëren samen met je stakeholders
Gedeelde waarde creëren samen met je stakeholdersGedeelde waarde creëren samen met je stakeholders
Gedeelde waarde creëren samen met je stakeholders
 
Trias
TriasTrias
Trias
 
Sharks Love
Sharks LoveSharks Love
Sharks Love
 
The Windsurfing Trip
The Windsurfing TripThe Windsurfing Trip
The Windsurfing Trip
 
Where Is Carbon Jacobo
Where Is Carbon JacoboWhere Is Carbon Jacobo
Where Is Carbon Jacobo
 
Sociaal-cultureel werk in de digitale samenleving
Sociaal-cultureel werk in de digitale samenlevingSociaal-cultureel werk in de digitale samenleving
Sociaal-cultureel werk in de digitale samenleving
 
Проблемы архивного хранения документов на бумажных и электронных носителях
Проблемы архивного хранения документов на бумажных и электронных носителяхПроблемы архивного хранения документов на бумажных и электронных носителях
Проблемы архивного хранения документов на бумажных и электронных носителях
 
Programming 101
Programming 101Programming 101
Programming 101
 
Okra - Ik vinde de aarde leuk!
Okra - Ik  vinde de aarde leuk!Okra - Ik  vinde de aarde leuk!
Okra - Ik vinde de aarde leuk!
 
д-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES Trust
д-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES Trustд-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES Trust
д-р Лючиана Дюранти – Дополнение к презентации о проекте InterPARES Trust
 
Where Is Carbon Agustin
Where Is Carbon AgustinWhere Is Carbon Agustin
Where Is Carbon Agustin
 

Similar to Git 101 for_tarad_dev

Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .HELLOWorld889594
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control SystemKMS Technology
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An IntroductionBehzad Altaf
 
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...WSO2
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Git for uninitiated
Git for uninitiatedGit for uninitiated
Git for uninitiatedJohn C. Chan
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
 
Learn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsLearn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsGorav Singal
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlGiuseppe Masetti
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 

Similar to Git 101 for_tarad_dev (20)

Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .
 
Git training v10
Git training v10Git training v10
Git training v10
 
GIT-FirstPart.ppt
GIT-FirstPart.pptGIT-FirstPart.ppt
GIT-FirstPart.ppt
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
簡單介紹git
簡單介紹git簡單介紹git
簡單介紹git
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
 
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
 
Git training
Git trainingGit training
Git training
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Git for uninitiated
Git for uninitiatedGit for uninitiated
Git for uninitiated
 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
sample.pptx
sample.pptxsample.pptx
sample.pptx
 
Learn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levelsLearn Git - For Beginners and Intermediate levels
Learn Git - For Beginners and Intermediate levels
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version Control
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 

More from Somkiat Puisungnoen (20)

Next of Java 2022
Next of Java 2022Next of Java 2022
Next of Java 2022
 
Sck spring-reactive
Sck spring-reactiveSck spring-reactive
Sck spring-reactive
 
Part 2 :: Spring Boot testing
Part 2 :: Spring Boot testingPart 2 :: Spring Boot testing
Part 2 :: Spring Boot testing
 
vTalk#1 Microservices with Spring Boot
vTalk#1 Microservices with Spring BootvTalk#1 Microservices with Spring Boot
vTalk#1 Microservices with Spring Boot
 
Lesson learned from React native and Flutter
Lesson learned from React native and FlutterLesson learned from React native and Flutter
Lesson learned from React native and Flutter
 
devops
devops devops
devops
 
Angular :: basic tuning performance
Angular :: basic tuning performanceAngular :: basic tuning performance
Angular :: basic tuning performance
 
Shared code between projects
Shared code between projectsShared code between projects
Shared code between projects
 
Distributed Tracing
Distributed Tracing Distributed Tracing
Distributed Tracing
 
Manage data of service
Manage data of serviceManage data of service
Manage data of service
 
RobotFramework Meetup at Thailand #2
RobotFramework Meetup at Thailand #2RobotFramework Meetup at Thailand #2
RobotFramework Meetup at Thailand #2
 
Visual testing
Visual testingVisual testing
Visual testing
 
Cloud Native App
Cloud Native AppCloud Native App
Cloud Native App
 
Wordpress for Newbie
Wordpress for NewbieWordpress for Newbie
Wordpress for Newbie
 
Sck Agile in Real World
Sck Agile in Real WorldSck Agile in Real World
Sck Agile in Real World
 
Clean you code
Clean you codeClean you code
Clean you code
 
SCK Firestore at CNX
SCK Firestore at CNXSCK Firestore at CNX
SCK Firestore at CNX
 
Unhappiness Developer
Unhappiness DeveloperUnhappiness Developer
Unhappiness Developer
 
The Beauty of BAD code
The Beauty of  BAD codeThe Beauty of  BAD code
The Beauty of BAD code
 
React in the right way
React in the right wayReact in the right way
React in the right way
 

Git 101 for_tarad_dev