19
GIT two words introduction Maurilio Di Cicco

GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

GITtwo words introduction

Maurilio Di Cicco

Page 2: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

About

● Git / t/ is a distributed revision control and ɡɪsource code management (SCM) system with an emphasis on speed

Page 3: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Why GIT

● Really popular SCM system● Many ROS packages needs to be downloaded

(CLONED) from GIT repositories

Page 4: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Why SCM - 1

● Sources sharing across networks

● User signature on each revision

● More advanced features (local/remote repository, branching...)

Page 5: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Why SCM - 2

● Each revision is stored on the repository

● Rollback to a working version (after a disaster update) it's blazing fast

Page 6: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Why SCM - 2

● Each revision is stored on the repository

● Rollback to a working version (after a disaster update) it's blazing fast

Page 7: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Installing GIT

● sudo apt­get install git­core

Page 8: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Obtaining the code

FIRMWARE

git clone https://github.com/mauriliodc/capybara.git

ROS NODE

git clone https://github.com/mauriliodc/capybara_node.git

Page 9: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Example from a ROS package

Page 10: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Example from a ROS package

Page 11: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Example from a ROS package

Page 12: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

GITHUB

● Online git repository● Free for open source

projects

Page 13: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Basics

● git clone $URL

copy the whole repository and it's story on the local machine

Page 14: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Basics

● git add $FILEgit commit $MESSAGE

the file new release is confirmed and locked in the local repository.

Page 15: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Basics

● git pull

downloads the updated files from the remote reposity

Page 16: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Basics

● git push

sends the committed files to the remote repository

Page 17: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Basics

● git branch

list all available branches

Page 18: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

Basics

● git checkout $BRANCHNAME

switch from current branch to $BRANCHNAME

Page 19: GITnardi/Didattica/LabAI/matdid/GIT_SLI… · About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed

An example of branches