Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Git for Dummies
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Luca Simone
February 04, 2013
Programming
230
2
Share
Git for Dummies
Presentazione in italiano sul version control system Git.
Luca Simone
February 04, 2013
More Decks by Luca Simone
See All by Luca Simone
I bet my mirror is smarter than yours
lukefx
0
57
GISDay 2015 - Web GIS @ ti.ch
lukefx
0
99
Git @ CSI
lukefx
0
67
Other Decks in Programming
See All in Programming
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
410
Road to RubyKaigi: Play Hard(ware)
makicamel
1
520
Running Swift without an OS
kishikawakatsumi
0
870
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
960
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
250
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
340
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
140
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
300
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.1k
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
120
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
150
AIと共に生きる技術選定 2026
sgash708
0
120
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
460
Test your architecture with Archunit
thirion
1
2.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
350
Tell your own story through comics
letsgokoyo
1
910
Writing Fast Ruby
sferik
630
63k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Designing Experiences People Love
moore
143
24k
Evolving SEO for Evolving Search Engines
ryanjones
0
180
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Transcript
None
Perché abbiamo scelto git?
Alcuni comandi base init • Inizializza un nuovo repository all’interno
della cartella corrente • Crea la sottocartella .git che conterrà tutti i file ad uso interno di git
Alcuni comandi base clone • Clona un repository git esistente
Alcuni comandi base add • Aggiunge un nuovo file a
git, che da quel momento ne terrà traccia • Aggiunge un file modificato all’area di staging
git add nomefile
Alcuni comandi base commit • Memorizza lo snapshot delle modifiche
fatte • Obbligatorio inserire un messaggio • Identificato da hash SHA-1
Alcuni comandi base log • Mostra la storia dei commit
• Per ciascuno elenca autore e messaggio
Alcuni comandi base branch • Consente di continuare lo sviluppo
su una nuova feature senza impattare sul lavoro corrente • Fortemente utilizzato
Branching branch
Branching branch
Branching $ vi test.rb $ git add . $ git
commit -m modificato test.rb'
Alcuni comandi base checkout • Consente di passare da un
branch all’altra
Branching $ git checkout master
Alcuni comandi base merge • Incorpora nella branch corrente le
modifiche fatte su un altra branch • Assieme a branch, è un altro comando che git incentiva ad usare spesso
Branching $ git checkout master $ git merge iss55
Alcuni comandi base rebase • Altro modo per integrare le
modifiche di una branch • Prende linearmente tutte le modifiche fatte su una branch e le applica ad un altra
Branching $ git merge experiment $ git rebase experiment
Branching $ git merge experiment $ git rebase experiment Prende
gli ultimi commit e li «mette assieme», creando un nuovo commit di merge Applica le modifiche di una branch linearmente su un altra branch
Alcuni comandi base remote
Alcuni comandi base fetch • Scarica branch e dati da
un repository remoto
Alcuni comandi base pull • Scarica dati da un repository
remoto e tenta di fare il merge con il branch corrente • pull = fetch + merge
Alcuni comandi base push • Invia branch e dati ad
un repository remoto • Consente di aggiornare il repository remoto con le modifiche fatte localmente
Alcuni comandi base remote
Long-running branches master branch • Allineato con versione on-line develop
branch • Allineato con versione in sviluppo
Topic branches • Branch in cui sviluppare feature • Feature
terminata (e testata)? merge su develop • Al termine, il branch viene cancellato
Hotfix branches • Per bug fix / interventi veloci •
Fix terminato, merge su develop • Cancellato al termine del merge • Ha una vita molto breve
Best practices • Fare commit spesso • Aprire una pull
request il prima possibile • Un commit deve inglobare un insieme atomico di modifiche • NON lavorare N giorni in attesa di aver finito il task! • Al massimo fare tutti i commit alla fine, sfruttando lo staging
Utilizzo di Stash per gestire i repository
Testo del commit • Sommario da max 50 caratteri •
Seguito (eventualmente) da descrizione più dettagliata • Forma imperativa (es. «Add products section», ...)
Git workflow
Git workflow
Git workflow