git · maurilio di cicco. about git / t/ is a distributed revision control and ɡɪ source code...

19
GIT two words introduction Maurilio Di Cicco

Upload: others

Post on 07-Nov-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

GITtwo words introduction

Maurilio Di Cicco

Page 2: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

About

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

Page 3: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Why GIT

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

(CLONED) from GIT repositories

Page 4: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Why SCM - 1

● Sources sharing across networks

● User signature on each revision

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

Page 5: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

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: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

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: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Installing GIT

● sudo apt­get install git­core

Page 8: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

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: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Example from a ROS package

Page 10: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Example from a ROS package

Page 11: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Example from a ROS package

Page 12: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

GITHUB

● Online git repository● Free for open source

projects

Page 13: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Basics

● git clone $URL

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

Page 14: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Basics

● git add $FILEgit commit $MESSAGE

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

Page 15: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Basics

● git pull

downloads the updated files from the remote reposity

Page 16: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Basics

● git push

sends the committed files to the remote repository

Page 17: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Basics

● git branch

list all available branches

Page 18: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

Basics

● git checkout $BRANCHNAME

switch from current branch to $BRANCHNAME

Page 19: GIT · Maurilio Di Cicco. About Git / t/ is a distributed revision control and ɡɪ source code management (SCM) system with an emphasis on speed. Why GIT

An example of branches