SlideShare a Scribd company logo
1 of 21
Download to read offline
WebElement #20
Hacking Life With GIT
Upravená verzia
GIT partizán
TFS Server
GIT <-> TFS
GIT
TFS ClientTFS Client
Land of unicorns
WTF Servers
Scenáre
• GIT <-> * synchronizácia
• rýchly prenos zdrojákov
• configuration management
• database management
• transformácia dát
• hľadanie chýb
GIT <-> * synchronizácia
Version
Control
System
GIT
* (download)
git add --all
git commit -m
git diff --name-status HEAD^
* (upload)
Rýchly prenos zdrojákov
Problém: pomalá sieť + veľa malých súborov
• git gc --aggressive --prune=now
• xcopy .git
• git reset --hard
Configuration Management
Ignored changes
Server versioned
changes (shared)
Locally versioned
changes (non-shared)
Konvencia: „IGNORE“ commity nie sú nikdy pushnuté do remote vetvy
Configuration Management (2)
git cherry-pick
Nová feature vetva
Configuration Management (3)
Príprava na push do remote vetvy
git cherry-pick
resp.
git rebase -i
všetky commity okrem IGNORE
Configuration Management (4)
git push git rebase
Výsledok: lokálna vetva stále obsahuje našu konfiguráciu, bez vplyvu na ostatných
DB management
Database
Script DDL
Script data
GIT
Diff
Grep
DB management (2)
Výhoda: zmeny v DDL sa ľahko sledujú
DB management (3)
Prax: kombinácia CREATE + ALTER
Iterácia N
Alter Alter
Migrácia
Create
Snapshot
na začiatku iterácie
Iterácia N+1
Alter Alter
Migrácia
Create
Snapshot
na začiatku iterácie
Transformácia dát
Scenár: komplikovaná transformácia (textu)
Idea: malé kroky, commitovať zmeny kód + dáta
Kód
Dáta
Transform header
Kód
Dáta
Transform body
Kód
Dáta
Transform footer
Transformácia dát (2)
Zmena
kódu
Zmena
dát
Transformácia dát (3)
Zmena
kódu
Zmena
dát
Transformácia dát (4)
Výhody: absolútna kontrola
• jednoduchosť
• zmeny voči predošlému kroku
• zmysluplné „checkpointy“
• ľahké experimentovanie (vetvy)
Squash!
Hľadanie chýb
Scenár: dlho neodhalená regresná chyba
Idea: binárne vyhľadávanie v commitoch
Hľadanie chýb (2)
dlhá doba
regresná chyba
OK
chceme nájsť
Hľadanie chýb (3)
chyba
niekde tu
Hľadanie chýb (4)
chyba
niekde tu
Hľadanie chýb (5)
Výsledok: rýchla identifikácia commitu s chybou
Automatizácia:
• git bisect

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

WebElement #20: Ondrej Svitek - Hacking Life With Git