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
Luca Simone
February 04, 2013
Programming
2
220
Git for Dummies
Presentazione in italiano sul version control system Git.
Luca Simone
February 04, 2013
Tweet
Share
More Decks by Luca Simone
See All by Luca Simone
I bet my mirror is smarter than yours
lukefx
0
53
GISDay 2015 - Web GIS @ ti.ch
lukefx
0
93
Git @ CSI
lukefx
0
62
Other Decks in Programming
See All in Programming
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
330
Team topologies and the microservice architecture: a synergistic relationship
cer
PRO
0
1k
技術同人誌をMCP Serverにしてみた
74th
0
280
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
910
関数型まつりレポート for JuliaTokai #22
antimon2
0
150
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
190
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
470
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
100
Select API from Kotlin Coroutine
jmatsu
1
190
ReadMoreTextView
fornewid
1
460
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
2
230
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
260
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Building Applications with DynamoDB
mza
95
6.5k
The Language of Interfaces
destraynor
158
25k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Invisible Side of Design
smashingmag
299
51k
Code Review Best Practice
trishagee
68
18k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Unsuck your backbone
ammeep
671
58k
Become a Pro
speakerdeck
PRO
28
5.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
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