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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
58
GISDay 2015 - Web GIS @ ti.ch
lukefx
0
100
Git @ CSI
lukefx
0
68
Other Decks in Programming
See All in Programming
CSC307 Lecture 17
javiergs
PRO
0
310
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
420
Claspは野良GASの夢をみるか
takter00
0
150
RTSPクライアントを自作してみた話
simotin13
0
420
さぁV100、メモリをお食べ・・・
nilpe
0
120
Inside Stream API
skrb
1
540
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
210
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
230
Swiftのレキシカルスコープ管理
kntkymt
0
210
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
140
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
460
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.5k
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Thoughts on Productivity
jonyablonski
76
5.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Navigating Weather and Climate Data
rabernat
0
210
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
260
Raft: Consensus for Rubyists
vanstee
141
7.5k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
22k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
420
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