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
230
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
59
GISDay 2015 - Web GIS @ ti.ch
lukefx
0
100
Git @ CSI
lukefx
0
68
Other Decks in Programming
See All in Programming
AIを紡ぐPMのお話
swdtkuy
0
110
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.7k
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.9k
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
290
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
270
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.8k
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
180
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
270
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
710
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
400
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
680
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
770
Featured
See All Featured
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
290
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Marketing to machines
jonoalderson
1
5.7k
Code Review Best Practice
trishagee
74
20k
Done Done
chrislema
186
16k
Unsuck your backbone
ammeep
672
58k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
The Cult of Friendly URLs
andyhume
79
7k
New Earth Scene 8
popppiees
3
2.5k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
210
RailsConf 2023
tenderlove
30
1.5k
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