SlideShare uma empresa Scribd logo
1 de 57
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
VS04 – TFS: Quale
source control
Gian Maria Ricci
alkampfer@nablasoft.com - @alkampfer
http://www.codewrecks.com/
http://www.getlatestversion.it/
http://blogs.ugidotnet.org/rgm
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Grazie a
Sponsor
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Tfs e git, perché?
• Richiesta di avere un source control distribuito
• Diffusione capillare e supporto su tutti i sistemi / IDE / strumenti
• Stabile, manutenuto ed in continua evoluzione
• Apertura verso l’open source
• Lavoro offline
• Easy Branching
• Integrato con TFS al pari (quasi) di TFVC
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Non esiste Microsoft Git
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Cosa scelgo?
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Quando scegliere
• Un Team Project può utilizzare solamente TFVC oppure Git
• In approcci con «Single Team Project» questo significa scegliere il source
control all’inizio
• È comunque possibile creare un nuovo Team Project e «convertire» il
vecchio codice
• Passare da un centralizzato ad un distribuito o viceversa comporta
comunque riorganizzare/istruire/cambiare
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
VCS – Paradigmi di base
Pro Contro
Check-in
Check-out
• Codebase molto grandi
• Security granulare
• Controllo attività utenti
• Meno intuitivo
• Favorisce l’uso di lock
• Sempre connesso
• Editing offline
• Cross tool
• Intuitivo per chi viene
da SVN
• Meno performante per
codebase molto larghe
• No check-out lock
• Completamente offline
• Clone completo
• First Class Branching
• …
• Più complesso
• Non performante per
grandi file binari
• Necessita di più
disciplina
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
TFVC > Git / Git > TFVC
Git TFVC
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Debbo reimparare tutto?
Supporto Nativo in
Visual Studio
Confort Zone
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
demo
Primi passi con Git e Visual Studio
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Andando in profondità
Visual Studio ha un
buon supporto git,
che è in continua
evoluzione,
ma git è complesso
è va «masticato»
bene per non farsi
male
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Alcune considerazioni
Git Pro
Supporto IDE multiple
Multi sistema
Stack Overflow
Branching
Offline
Well Known Workflow
Git Contro
Strumenti eterogenei
Necessità di più training
Complicazione History
Strutturazione repository
Tfvc Pro
Semplice
Repository Lineare
Sopporta repo mal strutturati
Tfvc Contro
Scarso supporto branch
Nessun supporto offline
Flussi di lavoro semplici
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Cattive analogie TFVC <-> Git
• Git è simile a TFVC, solamente che si ha un repository locale ed uno (o
piu server remoti)
• Git pull è l’analogo di Get Latest Version (falso)
• Git push è l’analogo di Check-in (falsissimo)
• Git va approcciato come uno strumento completamente nuovo senza
nessun paradigma con VCS centralizzati
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Ognuno ha un repository
Tutti i repository sono
paritari
Nello scenario più semplice
un repository è considerato
il Principale
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Git no quando?
Quando dovreste evitare di usare git
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Siete confortevoli con il VCS attuale
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
La struttura cartelle non è ben
organizzata
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Il team ha poco training su VCS
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Git si quando?
Quali sono i segnali che fanno capire che potreste avere bisogno di Git
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Necessità di lavo offline locale
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Avete abusato del branching
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Il VCS attuale vi va stretto
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Usate tecnologie eterogenee
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Vale la pena provarlo?
Perché potrebbe essere utile iniziare a «familiarizzare» con Git
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Github e open source
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Supporto a scenari misti
TFVC
SVN
Git-tf
Git svn
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Git come «ponte» tra mondi
Team Foundation Server / Service
Team Project
Git TFVC
WI Build …
3rd party
Local
Repo
Remote
Remote
SVNGit Svn
Git Tf
TFVC
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Come switchare
Credo che Git sia lo strumento giusto, ma come introdurlo?
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Evitare switch immediati
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Git-tf per acquisire familiarità
Usare Git in locale
mantenendo il
centralizzato
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Training e progetti pilota
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Decidere una strategia (es GitFlow)
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Gitflow
• http://nvie.com/posts/a-successful-git-branching-model/
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Flussi di sviluppo avanzati
• https://www.atlassian.com/git/tutorials/comparing-workflows
• Git permette molti flussi di lavoro differenti
• È fortemente consigliato esaminarli attentamente prima di introdurre
git nel proprio team
• Usate (se possibile) piccoli progetti reali per comparare i flussi ed
acquisire familiarità
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Git 101
Una serie di informazioni «minimali» per capire meglio perché Git è
differente da TFVC
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Un utile paradigma
Git crea snapshot di una cartella
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Una sequenza di snapshot
Commits
Ogni commit
rappresenta un
immagine della
cartella
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Contenuto di un commit
2ab56.. ae14f.. 24d36.. 3abe5..
Foo.txt
Bar.txt
42.cs
Ptr.vcproj
Foo.txt
Bar.txt
42.cs
Ptr.vcproj
Foo.txt
Bar.txt
42.cs
Ptr.vcproj
Foo.txt
Bar.txt
42.cs
Ptr.vcproj
ID = SHA1
Bar.txt
42.cs
Foo.txt
Ptr.vcproj
Foo.txt
Bar.txt
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Che commit è attivo ora?
802992c ab352fc b426dca 364ba23
HEAD
In ogni momento il
puntatore HEAD identifica il
commit che rappresenta il
contenuto attuale della
cartella
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Cosa è un commit
802992c ab352fc b426dca
HEAD
Modifiche
locali Staging Area
a536dbc
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Cosa è una branch (e qui iniziamo a
divertirci veramente)
802992c ab352fc b426dca
Modifiche
locali Staging Area
a536dbc
HEAD master
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
La branch «master» è un puntatore
802992c ab352fc b426dca a536dbc
HEAD master
Spostare la HEAD significa
«riprstinare» uno snapshot
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Detatched HEAD
802992c ab352fc b426dca a536dbc
HEAD master
Una Detached HEAD è
simile ad un «get specific
version»
Da una specific version in
TFVC non potete fare un
changeset
Capitan Ovvio
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Ma ... se … Metto un altro puntatore?
802992c ab352fc b426dca
Modifiche
locali Staging Area
a536dbc
masterHEAD test
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Con più puntatori ho più versioni
802992c ab352fc b426dca
Modifiche
locali Staging Area
a536dbc
master HEAD test
abd34ea
testmaster
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Un repository Git è un Directed
Acyclic Graph
802992c ab352fc B426dca
abd34ea
a536dbc
test
HEADmaster
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Conflitti
Cosa accade con alberi incompatibili
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Ogni sviluppatore ha una sua master
802992c ab352fc B426dca 12ab456
802992c ab352fc B426dca ef3456
Gli sviluppatori hanno
aggiornato la master al
b426dca Ognuno ha fatto una
modifica
master
master
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Come si condivide il codice?
802992c ab352fc B426dca 12ab456
802992c ab352fc B426dca ef3456
802992c ab352fc B426dca ef3456
Inviare le
modifiche all’origin
significa spostare i
commit binari
ef3456
master
master
master
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Come si condivide il codice?
802992c ab352fc B426dca 12ab456
802992c ab352fc B426dca ef3456
802992c ab352fc B426dca ef3456
Non potete inviare
modifiche se i grafi
sono incompatibili
12ab456
master
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Gestire il conflitto - fetch
802992c ab352fc B426dca
12ab456
ef3456
802992c ab352fc B426dca ef3456
Il primo passo è
fare un Fetch dal
server
master
origin/master
master
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Gestire il conflitto - merge
802992c ab352fc B426dca
12ab456
ef3456
802992c ab352fc B426dca ef3456
Localmente si
effettua una merge
tra le branch
master
origin/master
fe34bd
master
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
802992c ab352fc B426dca
12ab456
Ef3456
Gestire il conflitto – invio al server
802992c ab352fc B426dca
12ab456
Ef3456
Ora si può tentare
un nuovo push al
server
master
fe34bdEf3456
origin/master
fe34bd
12ab456
master
fe34bd
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Rebase
Perché non si vive di solo pull
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Gestire il conflitto - fetch
802992c ab352fc B426dca
12ab456
ef3456
802992c ab352fc B426dca ef3456
Il primo passo è
fare un Fetch dal
server
master
origin/master
master
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Gestire il conflitto – and rebase
802992c ab352fc B426dca
12ab456
ef3456
802992c ab352fc B426dca ef3456
master
origin/master
master
12ab456
eb54af2
#CDays14 – Roma - 23, 24 e 25 Settembre 2014
Q&A
Tutto il materiale di questa sessione su
http://www.communitydays.it/
Lascia il feedback su questa sessione dal sito,
potrai essere estratto per i nostri premi!
Seguici su
Twitter @CommunityDaysIT
Facebook http://facebook.com/cdaysit
#CDays14

Mais conteúdo relacionado

Destaque

Tesi Laurea Specialistica Ingegneria Informatica. Alessandro Andreosè
Tesi Laurea Specialistica Ingegneria Informatica. Alessandro AndreosèTesi Laurea Specialistica Ingegneria Informatica. Alessandro Andreosè
Tesi Laurea Specialistica Ingegneria Informatica. Alessandro Andreosèguesta10af3
 
Windows 10 app design
Windows 10 app designWindows 10 app design
Windows 10 app designLuca Di Fino
 
Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Manuel Scapolan
 
Dai delegati a LINQ con C#
Dai delegati a LINQ con C#Dai delegati a LINQ con C#
Dai delegati a LINQ con C#Manuel Scapolan
 
Domain Driven Design e CQRS
Domain Driven Design e CQRSDomain Driven Design e CQRS
Domain Driven Design e CQRSManuel Scapolan
 
Model-View-ViewModel
Model-View-ViewModelModel-View-ViewModel
Model-View-ViewModelDotNetMarche
 
Usare le nuove WCF Web Api per creare servizi RESTful
Usare le nuove WCF Web Api per creare servizi RESTfulUsare le nuove WCF Web Api per creare servizi RESTful
Usare le nuove WCF Web Api per creare servizi RESTfulLuca Milan
 
ARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILEARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILEDotNetCampus
 
Silverlight m v-vm @ DotNetteria
Silverlight m v-vm @ DotNetteriaSilverlight m v-vm @ DotNetteria
Silverlight m v-vm @ DotNetteriaMauro Servienti
 
Scrum? E' come fare il bucato!
Scrum? E' come fare il bucato!Scrum? E' come fare il bucato!
Scrum? E' come fare il bucato!Manuel Scapolan
 
AntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatoreAntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatoreManuel Scapolan
 
"Don't call us, we'll call you" - AngularJS meets Event-Driven Architecture
"Don't call us, we'll call you" - AngularJS meets Event-Driven Architecture"Don't call us, we'll call you" - AngularJS meets Event-Driven Architecture
"Don't call us, we'll call you" - AngularJS meets Event-Driven ArchitectureLuca Milan
 

Destaque (18)

Tesi Laurea Specialistica Ingegneria Informatica. Alessandro Andreosè
Tesi Laurea Specialistica Ingegneria Informatica. Alessandro AndreosèTesi Laurea Specialistica Ingegneria Informatica. Alessandro Andreosè
Tesi Laurea Specialistica Ingegneria Informatica. Alessandro Andreosè
 
Windows 10 app design
Windows 10 app designWindows 10 app design
Windows 10 app design
 
Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)Managed Extensibility Framework (MEF)
Managed Extensibility Framework (MEF)
 
Dai delegati a LINQ con C#
Dai delegati a LINQ con C#Dai delegati a LINQ con C#
Dai delegati a LINQ con C#
 
Knockout.js
Knockout.jsKnockout.js
Knockout.js
 
Domain Driven Design e CQRS
Domain Driven Design e CQRSDomain Driven Design e CQRS
Domain Driven Design e CQRS
 
Model-View-ViewModel
Model-View-ViewModelModel-View-ViewModel
Model-View-ViewModel
 
Usare le nuove WCF Web Api per creare servizi RESTful
Usare le nuove WCF Web Api per creare servizi RESTfulUsare le nuove WCF Web Api per creare servizi RESTful
Usare le nuove WCF Web Api per creare servizi RESTful
 
ARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILEARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILE
 
WPF
WPFWPF
WPF
 
WPF basics
WPF basicsWPF basics
WPF basics
 
NOSQL
NOSQLNOSQL
NOSQL
 
Silverlight m v-vm @ DotNetteria
Silverlight m v-vm @ DotNetteriaSilverlight m v-vm @ DotNetteria
Silverlight m v-vm @ DotNetteria
 
Scrum? E' come fare il bucato!
Scrum? E' come fare il bucato!Scrum? E' come fare il bucato!
Scrum? E' come fare il bucato!
 
AntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatoreAntiPatterns: i vizi del programmatore
AntiPatterns: i vizi del programmatore
 
WPF MVVM Toolkit
WPF MVVM ToolkitWPF MVVM Toolkit
WPF MVVM Toolkit
 
OOP with C#
OOP with C#OOP with C#
OOP with C#
 
"Don't call us, we'll call you" - AngularJS meets Event-Driven Architecture
"Don't call us, we'll call you" - AngularJS meets Event-Driven Architecture"Don't call us, we'll call you" - AngularJS meets Event-Driven Architecture
"Don't call us, we'll call you" - AngularJS meets Event-Driven Architecture
 

Semelhante a TFS - Quale source control

Sviluppare applicazioni web (completamente) on-line con Visual Studio Online ...
Sviluppare applicazioni web (completamente) on-line con Visual Studio Online ...Sviluppare applicazioni web (completamente) on-line con Visual Studio Online ...
Sviluppare applicazioni web (completamente) on-line con Visual Studio Online ...Marco Parenzan
 
Sviluppare app per iOS e Android con Xamarin e Visual Studio
Sviluppare app per iOS e Android con Xamarin e Visual StudioSviluppare app per iOS e Android con Xamarin e Visual Studio
Sviluppare app per iOS e Android con Xamarin e Visual StudioNicolò Carandini
 
Web in real time con signalR
Web in real time con signalRWeb in real time con signalR
Web in real time con signalRNicolò Carandini
 
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023AndreaStagi3
 
Vs04 - DevOps: Continuous Deployment con Windows Azure
Vs04 - DevOps: Continuous Deployment con Windows AzureVs04 - DevOps: Continuous Deployment con Windows Azure
Vs04 - DevOps: Continuous Deployment con Windows AzureAntonio Liccardi
 
Marco Arena - Perché nel 2015 parliamo ancora di C++? | Codemotion Milan 2015
Marco Arena - Perché nel 2015 parliamo ancora di C++? | Codemotion Milan 2015Marco Arena - Perché nel 2015 parliamo ancora di C++? | Codemotion Milan 2015
Marco Arena - Perché nel 2015 parliamo ancora di C++? | Codemotion Milan 2015Codemotion
 
CommunityDays 2015 - NPM, GRUNT E BOWER: IL NUOVO PACKAGE MANAGER DI VISUAL S...
CommunityDays 2015 - NPM, GRUNT E BOWER: IL NUOVO PACKAGE MANAGER DI VISUAL S...CommunityDays 2015 - NPM, GRUNT E BOWER: IL NUOVO PACKAGE MANAGER DI VISUAL S...
CommunityDays 2015 - NPM, GRUNT E BOWER: IL NUOVO PACKAGE MANAGER DI VISUAL S...Gianluca Carucci
 
WP04 -Sensori e hardware con Windows Phone 8.1
WP04 -Sensori e hardware con Windows Phone 8.1WP04 -Sensori e hardware con Windows Phone 8.1
WP04 -Sensori e hardware con Windows Phone 8.1Dan Ardelean
 
[ITA] Sql Saturday 355 in Parma - New SQL Server databases under source control
[ITA] Sql Saturday 355 in Parma - New SQL Server databases under source control[ITA] Sql Saturday 355 in Parma - New SQL Server databases under source control
[ITA] Sql Saturday 355 in Parma - New SQL Server databases under source controlAlessandro Alpi
 
VS13 - Approval Tests: cosa, come, quando, perché? @ CDays
VS13 - Approval Tests: cosa, come, quando, perché? @ CDaysVS13 - Approval Tests: cosa, come, quando, perché? @ CDays
VS13 - Approval Tests: cosa, come, quando, perché? @ CDaysMatteo Baglini
 
Code quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScriptCode quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScriptRoberto Messora
 
Il computer dice no!
Il computer dice no!Il computer dice no!
Il computer dice no!Matteo Emili
 
Introduzione pratica a docker, da chi lo ha appena conosciuto
Introduzione pratica a docker, da chi lo ha appena conosciutoIntroduzione pratica a docker, da chi lo ha appena conosciuto
Introduzione pratica a docker, da chi lo ha appena conosciutoDaniele Megna
 
Meetup Azure DevOps
Meetup Azure DevOpsMeetup Azure DevOps
Meetup Azure DevOpsdotnetcode
 
Meetup Azure DevOps
Meetup Azure DevOpsMeetup Azure DevOps
Meetup Azure DevOpsdotnetcode
 
Da JavaScript a TypeScript
Da JavaScript a TypeScriptDa JavaScript a TypeScript
Da JavaScript a TypeScriptRoberto Messora
 

Semelhante a TFS - Quale source control (20)

Sviluppare applicazioni web (completamente) on-line con Visual Studio Online ...
Sviluppare applicazioni web (completamente) on-line con Visual Studio Online ...Sviluppare applicazioni web (completamente) on-line con Visual Studio Online ...
Sviluppare applicazioni web (completamente) on-line con Visual Studio Online ...
 
Sviluppare app per iOS e Android con Xamarin e Visual Studio
Sviluppare app per iOS e Android con Xamarin e Visual StudioSviluppare app per iOS e Android con Xamarin e Visual Studio
Sviluppare app per iOS e Android con Xamarin e Visual Studio
 
Web in real time con signalR
Web in real time con signalRWeb in real time con signalR
Web in real time con signalR
 
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
Angular kit e Design system del Paese - Meetup ngRome 30 Gennaio 2023
 
Vs04 - DevOps: Continuous Deployment con Windows Azure
Vs04 - DevOps: Continuous Deployment con Windows AzureVs04 - DevOps: Continuous Deployment con Windows Azure
Vs04 - DevOps: Continuous Deployment con Windows Azure
 
Xamarin Robotics
Xamarin RoboticsXamarin Robotics
Xamarin Robotics
 
Marco Arena - Perché nel 2015 parliamo ancora di C++? | Codemotion Milan 2015
Marco Arena - Perché nel 2015 parliamo ancora di C++? | Codemotion Milan 2015Marco Arena - Perché nel 2015 parliamo ancora di C++? | Codemotion Milan 2015
Marco Arena - Perché nel 2015 parliamo ancora di C++? | Codemotion Milan 2015
 
CommunityDays 2015 - NPM, GRUNT E BOWER: IL NUOVO PACKAGE MANAGER DI VISUAL S...
CommunityDays 2015 - NPM, GRUNT E BOWER: IL NUOVO PACKAGE MANAGER DI VISUAL S...CommunityDays 2015 - NPM, GRUNT E BOWER: IL NUOVO PACKAGE MANAGER DI VISUAL S...
CommunityDays 2015 - NPM, GRUNT E BOWER: IL NUOVO PACKAGE MANAGER DI VISUAL S...
 
Sviluppare SPA con Vue.js
Sviluppare SPA con Vue.jsSviluppare SPA con Vue.js
Sviluppare SPA con Vue.js
 
WP04 -Sensori e hardware con Windows Phone 8.1
WP04 -Sensori e hardware con Windows Phone 8.1WP04 -Sensori e hardware con Windows Phone 8.1
WP04 -Sensori e hardware con Windows Phone 8.1
 
[ITA] Sql Saturday 355 in Parma - New SQL Server databases under source control
[ITA] Sql Saturday 355 in Parma - New SQL Server databases under source control[ITA] Sql Saturday 355 in Parma - New SQL Server databases under source control
[ITA] Sql Saturday 355 in Parma - New SQL Server databases under source control
 
Sviluppare SPA con Vue
Sviluppare SPA con VueSviluppare SPA con Vue
Sviluppare SPA con Vue
 
VS13 - Approval Tests: cosa, come, quando, perché? @ CDays
VS13 - Approval Tests: cosa, come, quando, perché? @ CDaysVS13 - Approval Tests: cosa, come, quando, perché? @ CDays
VS13 - Approval Tests: cosa, come, quando, perché? @ CDays
 
Code quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScriptCode quality e test automatizzati con JavaScript
Code quality e test automatizzati con JavaScript
 
Il computer dice no!
Il computer dice no!Il computer dice no!
Il computer dice no!
 
Introduzione pratica a docker, da chi lo ha appena conosciuto
Introduzione pratica a docker, da chi lo ha appena conosciutoIntroduzione pratica a docker, da chi lo ha appena conosciuto
Introduzione pratica a docker, da chi lo ha appena conosciuto
 
Meetup Azure DevOps
Meetup Azure DevOpsMeetup Azure DevOps
Meetup Azure DevOps
 
Meetup Azure DevOps
Meetup Azure DevOpsMeetup Azure DevOps
Meetup Azure DevOps
 
Da JavaScript a TypeScript
Da JavaScript a TypeScriptDa JavaScript a TypeScript
Da JavaScript a TypeScript
 
Containerized Liferay
Containerized LiferayContainerized Liferay
Containerized Liferay
 

Mais de Gian Maria Ricci

Se non sviluppo codice non sto lavorando
Se non sviluppo codice non sto lavorandoSe non sviluppo codice non sto lavorando
Se non sviluppo codice non sto lavorandoGian Maria Ricci
 
Gestire la qualità del codice con Visual Studio, SonarQube ed Azure Devops
Gestire la qualità del codice con Visual Studio, SonarQube ed Azure DevopsGestire la qualità del codice con Visual Studio, SonarQube ed Azure Devops
Gestire la qualità del codice con Visual Studio, SonarQube ed Azure DevopsGian Maria Ricci
 
Migrare da un VCS centralizzato a Git
Migrare da un VCS centralizzato a GitMigrare da un VCS centralizzato a Git
Migrare da un VCS centralizzato a GitGian Maria Ricci
 
Real World Build + Release automation in Azure DevOps
Real World Build + Release automation in Azure DevOpsReal World Build + Release automation in Azure DevOps
Real World Build + Release automation in Azure DevOpsGian Maria Ricci
 
Gestire i rilasci automatici con azure devops
Gestire i rilasci automatici con azure devopsGestire i rilasci automatici con azure devops
Gestire i rilasci automatici con azure devopsGian Maria Ricci
 
Build and release in code with azure devops pipelines
Build and release in code with azure devops pipelinesBuild and release in code with azure devops pipelines
Build and release in code with azure devops pipelinesGian Maria Ricci
 
Azure Pipeline in salsa yaml
Azure Pipeline in salsa yamlAzure Pipeline in salsa yaml
Azure Pipeline in salsa yamlGian Maria Ricci
 
Git gitflow pull requests in devops focused teams
Git gitflow pull requests in devops focused teamsGit gitflow pull requests in devops focused teams
Git gitflow pull requests in devops focused teamsGian Maria Ricci
 
Distribute your code with NUget and build vNext
Distribute your code with NUget and build vNextDistribute your code with NUget and build vNext
Distribute your code with NUget and build vNextGian Maria Ricci
 
Manage your environment with DSC
Manage your environment with DSCManage your environment with DSC
Manage your environment with DSCGian Maria Ricci
 
Introduction to Application insights
Introduction to Application insightsIntroduction to Application insights
Introduction to Application insightsGian Maria Ricci
 
Deploy applications with TFS Build
Deploy applications with TFS BuildDeploy applications with TFS Build
Deploy applications with TFS BuildGian Maria Ricci
 
Introduction to Visual Studio Online
Introduction to Visual Studio OnlineIntroduction to Visual Studio Online
Introduction to Visual Studio OnlineGian Maria Ricci
 
Come Organizzare il proprio Team Project
Come Organizzare il proprio Team ProjectCome Organizzare il proprio Team Project
Come Organizzare il proprio Team ProjectGian Maria Ricci
 
Automatically deployment to Azure Web Sites
Automatically deployment to Azure Web SitesAutomatically deployment to Azure Web Sites
Automatically deployment to Azure Web SitesGian Maria Ricci
 

Mais de Gian Maria Ricci (20)

Se non sviluppo codice non sto lavorando
Se non sviluppo codice non sto lavorandoSe non sviluppo codice non sto lavorando
Se non sviluppo codice non sto lavorando
 
Gestire la qualità del codice con Visual Studio, SonarQube ed Azure Devops
Gestire la qualità del codice con Visual Studio, SonarQube ed Azure DevopsGestire la qualità del codice con Visual Studio, SonarQube ed Azure Devops
Gestire la qualità del codice con Visual Studio, SonarQube ed Azure Devops
 
Migrare da un VCS centralizzato a Git
Migrare da un VCS centralizzato a GitMigrare da un VCS centralizzato a Git
Migrare da un VCS centralizzato a Git
 
Real World Build + Release automation in Azure DevOps
Real World Build + Release automation in Azure DevOpsReal World Build + Release automation in Azure DevOps
Real World Build + Release automation in Azure DevOps
 
Gestire i rilasci automatici con azure devops
Gestire i rilasci automatici con azure devopsGestire i rilasci automatici con azure devops
Gestire i rilasci automatici con azure devops
 
Build and release in code with azure devops pipelines
Build and release in code with azure devops pipelinesBuild and release in code with azure devops pipelines
Build and release in code with azure devops pipelines
 
Azure Pipeline in salsa yaml
Azure Pipeline in salsa yamlAzure Pipeline in salsa yaml
Azure Pipeline in salsa yaml
 
Git gitflow pull requests in devops focused teams
Git gitflow pull requests in devops focused teamsGit gitflow pull requests in devops focused teams
Git gitflow pull requests in devops focused teams
 
Distribute your code with NUget and build vNext
Distribute your code with NUget and build vNextDistribute your code with NUget and build vNext
Distribute your code with NUget and build vNext
 
Manage your environment with DSC
Manage your environment with DSCManage your environment with DSC
Manage your environment with DSC
 
Introduction to Application insights
Introduction to Application insightsIntroduction to Application insights
Introduction to Application insights
 
Git branching model
Git branching modelGit branching model
Git branching model
 
Deploy applications with TFS Build
Deploy applications with TFS BuildDeploy applications with TFS Build
Deploy applications with TFS Build
 
Branch model in Git
Branch model in GitBranch model in Git
Branch model in Git
 
Introduction to Visual Studio Online
Introduction to Visual Studio OnlineIntroduction to Visual Studio Online
Introduction to Visual Studio Online
 
Git si o Git No
Git si o Git NoGit si o Git No
Git si o Git No
 
Testing
TestingTesting
Testing
 
Come Organizzare il proprio Team Project
Come Organizzare il proprio Team ProjectCome Organizzare il proprio Team Project
Come Organizzare il proprio Team Project
 
Git Perchè Usarlo
Git Perchè UsarloGit Perchè Usarlo
Git Perchè Usarlo
 
Automatically deployment to Azure Web Sites
Automatically deployment to Azure Web SitesAutomatically deployment to Azure Web Sites
Automatically deployment to Azure Web Sites
 

TFS - Quale source control

  • 1. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 VS04 – TFS: Quale source control Gian Maria Ricci alkampfer@nablasoft.com - @alkampfer http://www.codewrecks.com/ http://www.getlatestversion.it/ http://blogs.ugidotnet.org/rgm
  • 2. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Grazie a Sponsor
  • 3. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Tfs e git, perché? • Richiesta di avere un source control distribuito • Diffusione capillare e supporto su tutti i sistemi / IDE / strumenti • Stabile, manutenuto ed in continua evoluzione • Apertura verso l’open source • Lavoro offline • Easy Branching • Integrato con TFS al pari (quasi) di TFVC
  • 4. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Non esiste Microsoft Git
  • 5. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Cosa scelgo?
  • 6. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Quando scegliere • Un Team Project può utilizzare solamente TFVC oppure Git • In approcci con «Single Team Project» questo significa scegliere il source control all’inizio • È comunque possibile creare un nuovo Team Project e «convertire» il vecchio codice • Passare da un centralizzato ad un distribuito o viceversa comporta comunque riorganizzare/istruire/cambiare
  • 7. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 VCS – Paradigmi di base Pro Contro Check-in Check-out • Codebase molto grandi • Security granulare • Controllo attività utenti • Meno intuitivo • Favorisce l’uso di lock • Sempre connesso • Editing offline • Cross tool • Intuitivo per chi viene da SVN • Meno performante per codebase molto larghe • No check-out lock • Completamente offline • Clone completo • First Class Branching • … • Più complesso • Non performante per grandi file binari • Necessita di più disciplina
  • 8. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 TFVC > Git / Git > TFVC Git TFVC
  • 9. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Debbo reimparare tutto? Supporto Nativo in Visual Studio Confort Zone
  • 10. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 demo Primi passi con Git e Visual Studio
  • 11. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Andando in profondità Visual Studio ha un buon supporto git, che è in continua evoluzione, ma git è complesso è va «masticato» bene per non farsi male
  • 12. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Alcune considerazioni Git Pro Supporto IDE multiple Multi sistema Stack Overflow Branching Offline Well Known Workflow Git Contro Strumenti eterogenei Necessità di più training Complicazione History Strutturazione repository Tfvc Pro Semplice Repository Lineare Sopporta repo mal strutturati Tfvc Contro Scarso supporto branch Nessun supporto offline Flussi di lavoro semplici
  • 13. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Cattive analogie TFVC <-> Git • Git è simile a TFVC, solamente che si ha un repository locale ed uno (o piu server remoti) • Git pull è l’analogo di Get Latest Version (falso) • Git push è l’analogo di Check-in (falsissimo) • Git va approcciato come uno strumento completamente nuovo senza nessun paradigma con VCS centralizzati
  • 14. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Ognuno ha un repository Tutti i repository sono paritari Nello scenario più semplice un repository è considerato il Principale
  • 15. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Git no quando? Quando dovreste evitare di usare git
  • 16. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Siete confortevoli con il VCS attuale
  • 17. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 La struttura cartelle non è ben organizzata
  • 18. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Il team ha poco training su VCS
  • 19. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Git si quando? Quali sono i segnali che fanno capire che potreste avere bisogno di Git
  • 20. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Necessità di lavo offline locale
  • 21. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Avete abusato del branching
  • 22. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Il VCS attuale vi va stretto
  • 23. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Usate tecnologie eterogenee
  • 24. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Vale la pena provarlo? Perché potrebbe essere utile iniziare a «familiarizzare» con Git
  • 25. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Github e open source
  • 26. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Supporto a scenari misti TFVC SVN Git-tf Git svn
  • 27. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Git come «ponte» tra mondi Team Foundation Server / Service Team Project Git TFVC WI Build … 3rd party Local Repo Remote Remote SVNGit Svn Git Tf TFVC
  • 28. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Come switchare Credo che Git sia lo strumento giusto, ma come introdurlo?
  • 29. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Evitare switch immediati
  • 30. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Git-tf per acquisire familiarità Usare Git in locale mantenendo il centralizzato
  • 31. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Training e progetti pilota
  • 32. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Decidere una strategia (es GitFlow)
  • 33. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Gitflow • http://nvie.com/posts/a-successful-git-branching-model/
  • 34. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Flussi di sviluppo avanzati • https://www.atlassian.com/git/tutorials/comparing-workflows • Git permette molti flussi di lavoro differenti • È fortemente consigliato esaminarli attentamente prima di introdurre git nel proprio team • Usate (se possibile) piccoli progetti reali per comparare i flussi ed acquisire familiarità
  • 35. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Git 101 Una serie di informazioni «minimali» per capire meglio perché Git è differente da TFVC
  • 36. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Un utile paradigma Git crea snapshot di una cartella
  • 37. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Una sequenza di snapshot Commits Ogni commit rappresenta un immagine della cartella
  • 38. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Contenuto di un commit 2ab56.. ae14f.. 24d36.. 3abe5.. Foo.txt Bar.txt 42.cs Ptr.vcproj Foo.txt Bar.txt 42.cs Ptr.vcproj Foo.txt Bar.txt 42.cs Ptr.vcproj Foo.txt Bar.txt 42.cs Ptr.vcproj ID = SHA1 Bar.txt 42.cs Foo.txt Ptr.vcproj Foo.txt Bar.txt
  • 39. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Che commit è attivo ora? 802992c ab352fc b426dca 364ba23 HEAD In ogni momento il puntatore HEAD identifica il commit che rappresenta il contenuto attuale della cartella
  • 40. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Cosa è un commit 802992c ab352fc b426dca HEAD Modifiche locali Staging Area a536dbc
  • 41. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Cosa è una branch (e qui iniziamo a divertirci veramente) 802992c ab352fc b426dca Modifiche locali Staging Area a536dbc HEAD master
  • 42. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 La branch «master» è un puntatore 802992c ab352fc b426dca a536dbc HEAD master Spostare la HEAD significa «riprstinare» uno snapshot
  • 43. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Detatched HEAD 802992c ab352fc b426dca a536dbc HEAD master Una Detached HEAD è simile ad un «get specific version» Da una specific version in TFVC non potete fare un changeset Capitan Ovvio
  • 44. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Ma ... se … Metto un altro puntatore? 802992c ab352fc b426dca Modifiche locali Staging Area a536dbc masterHEAD test
  • 45. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Con più puntatori ho più versioni 802992c ab352fc b426dca Modifiche locali Staging Area a536dbc master HEAD test abd34ea testmaster
  • 46. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Un repository Git è un Directed Acyclic Graph 802992c ab352fc B426dca abd34ea a536dbc test HEADmaster
  • 47. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Conflitti Cosa accade con alberi incompatibili
  • 48. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Ogni sviluppatore ha una sua master 802992c ab352fc B426dca 12ab456 802992c ab352fc B426dca ef3456 Gli sviluppatori hanno aggiornato la master al b426dca Ognuno ha fatto una modifica master master
  • 49. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Come si condivide il codice? 802992c ab352fc B426dca 12ab456 802992c ab352fc B426dca ef3456 802992c ab352fc B426dca ef3456 Inviare le modifiche all’origin significa spostare i commit binari ef3456 master master master
  • 50. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Come si condivide il codice? 802992c ab352fc B426dca 12ab456 802992c ab352fc B426dca ef3456 802992c ab352fc B426dca ef3456 Non potete inviare modifiche se i grafi sono incompatibili 12ab456 master
  • 51. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Gestire il conflitto - fetch 802992c ab352fc B426dca 12ab456 ef3456 802992c ab352fc B426dca ef3456 Il primo passo è fare un Fetch dal server master origin/master master
  • 52. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Gestire il conflitto - merge 802992c ab352fc B426dca 12ab456 ef3456 802992c ab352fc B426dca ef3456 Localmente si effettua una merge tra le branch master origin/master fe34bd master
  • 53. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 802992c ab352fc B426dca 12ab456 Ef3456 Gestire il conflitto – invio al server 802992c ab352fc B426dca 12ab456 Ef3456 Ora si può tentare un nuovo push al server master fe34bdEf3456 origin/master fe34bd 12ab456 master fe34bd
  • 54. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Rebase Perché non si vive di solo pull
  • 55. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Gestire il conflitto - fetch 802992c ab352fc B426dca 12ab456 ef3456 802992c ab352fc B426dca ef3456 Il primo passo è fare un Fetch dal server master origin/master master
  • 56. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Gestire il conflitto – and rebase 802992c ab352fc B426dca 12ab456 ef3456 802992c ab352fc B426dca ef3456 master origin/master master 12ab456 eb54af2
  • 57. #CDays14 – Roma - 23, 24 e 25 Settembre 2014 Q&A Tutto il materiale di questa sessione su http://www.communitydays.it/ Lascia il feedback su questa sessione dal sito, potrai essere estratto per i nostri premi! Seguici su Twitter @CommunityDaysIT Facebook http://facebook.com/cdaysit #CDays14

Notas do Editor

  1. Slide da mostrare prima di iniziare la sessione – non rimuovere!
  2. Ultima slide, obbligatoria