Enviar pesquisa
Carregar
#3 - Git - Branching e Merging
•
6 gostaram
•
1,027 visualizações
Rodrigo Branas
Seguir
Branching e Merging com Git.
Leia menos
Leia mais
Software
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 149
Baixar agora
Baixar para ler offline
Recomendados
#2 - Git - DAG
#2 - Git - DAG
Rodrigo Branas
Git One Day Training Notes
Git One Day Training Notes
glen_a_smith
Git advanced
Git advanced
Peter Vandenabeele
Git and git flow
Git and git flow
Fran García
Learning git
Learning git
Sid Anand
Advanced Git
Advanced Git
Sergiu-Ioan Ungur
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Use o git e perca o medo de errar
Use o git e perca o medo de errar
Bruno Calheira
Recomendados
#2 - Git - DAG
#2 - Git - DAG
Rodrigo Branas
Git One Day Training Notes
Git One Day Training Notes
glen_a_smith
Git advanced
Git advanced
Peter Vandenabeele
Git and git flow
Git and git flow
Fran García
Learning git
Learning git
Sid Anand
Advanced Git
Advanced Git
Sergiu-Ioan Ungur
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Use o git e perca o medo de errar
Use o git e perca o medo de errar
Bruno Calheira
Git 101
Git 101
Sachet Mittal
Git basics
Git basics
GHARSALLAH Mohamed
Git - An Introduction
Git - An Introduction
Behzad Altaf
Introduction to Git and Github
Introduction to Git and Github
Roland Emmanuel Salunga
Git workflows presentation
Git workflows presentation
Mack Hardy
Advanced Git Presentation By Swawibe
Advanced Git Presentation By Swawibe
Md Swawibe Ul Alam
Introduction to git hub
Introduction to git hub
Naveen Pandey
Git e GitHub
Git e GitHub
Leonardo Marcelino
Advanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
Introdução ao Git
Introdução ao Git
Walmyr Carvalho
Intro to Git and GitHub
Intro to Git and GitHub
Panagiotis Papadopoulos
Git basics to advance with diagrams
Git basics to advance with diagrams
Dilum Navanjana
Introduction git
Introduction git
Dian Sigit Prastowo
Git and github
Git and github
Sayantika Banik
Git n git hub
Git n git hub
Jiwon Baek
Git for beginners
Git for beginners
Arulmurugan Rajaraman
Version control system and Git
Version control system and Git
ramubonkuri
Git and Github Session
Git and Github Session
GoogleDevelopersStud1
Git e GitHub - Conceitos Básicos
Git e GitHub - Conceitos Básicos
Henrique Silvestre Souza
Git and github 101
Git and github 101
Senthilkumar Gopal
Git-ing out of your git messes - Fluent Conf 2017
Git-ing out of your git messes - Fluent Conf 2017
Katie Sylor-Miller
#5 - Git - Contribuindo com um repositório remoto
#5 - Git - Contribuindo com um repositório remoto
Rodrigo Branas
Mais conteúdo relacionado
Mais procurados
Git 101
Git 101
Sachet Mittal
Git basics
Git basics
GHARSALLAH Mohamed
Git - An Introduction
Git - An Introduction
Behzad Altaf
Introduction to Git and Github
Introduction to Git and Github
Roland Emmanuel Salunga
Git workflows presentation
Git workflows presentation
Mack Hardy
Advanced Git Presentation By Swawibe
Advanced Git Presentation By Swawibe
Md Swawibe Ul Alam
Introduction to git hub
Introduction to git hub
Naveen Pandey
Git e GitHub
Git e GitHub
Leonardo Marcelino
Advanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
Introdução ao Git
Introdução ao Git
Walmyr Carvalho
Intro to Git and GitHub
Intro to Git and GitHub
Panagiotis Papadopoulos
Git basics to advance with diagrams
Git basics to advance with diagrams
Dilum Navanjana
Introduction git
Introduction git
Dian Sigit Prastowo
Git and github
Git and github
Sayantika Banik
Git n git hub
Git n git hub
Jiwon Baek
Git for beginners
Git for beginners
Arulmurugan Rajaraman
Version control system and Git
Version control system and Git
ramubonkuri
Git and Github Session
Git and Github Session
GoogleDevelopersStud1
Git e GitHub - Conceitos Básicos
Git e GitHub - Conceitos Básicos
Henrique Silvestre Souza
Git and github 101
Git and github 101
Senthilkumar Gopal
Mais procurados
(20)
Git 101
Git 101
Git basics
Git basics
Git - An Introduction
Git - An Introduction
Introduction to Git and Github
Introduction to Git and Github
Git workflows presentation
Git workflows presentation
Advanced Git Presentation By Swawibe
Advanced Git Presentation By Swawibe
Introduction to git hub
Introduction to git hub
Git e GitHub
Git e GitHub
Advanced Git Tutorial
Advanced Git Tutorial
Introdução ao Git
Introdução ao Git
Intro to Git and GitHub
Intro to Git and GitHub
Git basics to advance with diagrams
Git basics to advance with diagrams
Introduction git
Introduction git
Git and github
Git and github
Git n git hub
Git n git hub
Git for beginners
Git for beginners
Version control system and Git
Version control system and Git
Git and Github Session
Git and Github Session
Git e GitHub - Conceitos Básicos
Git e GitHub - Conceitos Básicos
Git and github 101
Git and github 101
Semelhante a #3 - Git - Branching e Merging
Git-ing out of your git messes - Fluent Conf 2017
Git-ing out of your git messes - Fluent Conf 2017
Katie Sylor-Miller
#5 - Git - Contribuindo com um repositório remoto
#5 - Git - Contribuindo com um repositório remoto
Rodrigo Branas
Understanding git
Understanding git
Avik Das
Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)
Boise Web Technologies Group
Sacándole jugo a git
Sacándole jugo a git
Berny Cantos
M.Mozūras - git
M.Mozūras - git
Agile Lietuva
Bend time to your will with git
Bend time to your will with git
Chris Tankersley
Keep you GIT history clean
Keep you GIT history clean
tomasbro
Git社内勉強会
Git社内勉強会
Hirata Daichi
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
tmacwilliam
Version Control and Git - GitHub Workshop
Version Control and Git - GitHub Workshop
All Things Open
Git For The Android Developer
Git For The Android Developer
Effective
Git Started With Git
Git Started With Git
Nick Quaranto
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
Becky Todd
Get Good With Git
Get Good With Git
Hoffman Lab
Keep your GIT history clean
Keep your GIT history clean
tomasbro
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Codemotion
Git-ing out of your git messes
Git-ing out of your git messes
Katie Sylor-Miller
git internals
git internals
Dennis Byrne
Git Without Puns
Git Without Puns
Chicago ALT.NET
Semelhante a #3 - Git - Branching e Merging
(20)
Git-ing out of your git messes - Fluent Conf 2017
Git-ing out of your git messes - Fluent Conf 2017
#5 - Git - Contribuindo com um repositório remoto
#5 - Git - Contribuindo com um repositório remoto
Understanding git
Understanding git
Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)
Sacándole jugo a git
Sacándole jugo a git
M.Mozūras - git
M.Mozūras - git
Bend time to your will with git
Bend time to your will with git
Keep you GIT history clean
Keep you GIT history clean
Git社内勉強会
Git社内勉強会
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
Version Control and Git - GitHub Workshop
Version Control and Git - GitHub Workshop
Git For The Android Developer
Git For The Android Developer
Git Started With Git
Git Started With Git
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
Get Good With Git
Get Good With Git
Keep your GIT history clean
Keep your GIT history clean
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Nicola Iarocci - Git stories from the front line - Codemotion Milan 2017
Git-ing out of your git messes
Git-ing out of your git messes
git internals
git internals
Git Without Puns
Git Without Puns
Mais de Rodrigo Branas
Clean Architecture
Clean Architecture
Rodrigo Branas
Node.js - #7 - Core Modules - http - Parte 1 - Rodrigo Branas
Node.js - #7 - Core Modules - http - Parte 1 - Rodrigo Branas
Rodrigo Branas
Node.js - #6 - Core Modules - net - Rodrigo Branas
Node.js - #6 - Core Modules - net - Rodrigo Branas
Rodrigo Branas
Node.js - #5 - Process - Rodrigo Branas
Node.js - #5 - Process - Rodrigo Branas
Rodrigo Branas
Node.js - #4 - Timers - Rodrigo Branas
Node.js - #4 - Timers - Rodrigo Branas
Rodrigo Branas
Node.js - #3 - Global Objects - Rodrigo Branas
Node.js - #3 - Global Objects - Rodrigo Branas
Rodrigo Branas
Node.js - #2 - Sistema de Módulos - Rodrigo Branas
Node.js - #2 - Sistema de Módulos - Rodrigo Branas
Rodrigo Branas
Node.js - #1 - Introdução - Rodrigo Branas
Node.js - #1 - Introdução - Rodrigo Branas
Rodrigo Branas
#6 - Git - Desfazendo as coisas
#6 - Git - Desfazendo as coisas
Rodrigo Branas
#1 - Git - Introdução
#1 - Git - Introdução
Rodrigo Branas
#4 - Git - Stash
#4 - Git - Stash
Rodrigo Branas
A evolução do AngularJS
A evolução do AngularJS
Rodrigo Branas
JavaScript - Date
JavaScript - Date
Rodrigo Branas
JavaScript - Expressões Regulares
JavaScript - Expressões Regulares
Rodrigo Branas
Automação de Testes com AngularJS
Automação de Testes com AngularJS
Rodrigo Branas
Scope AngularJS
Scope AngularJS
Rodrigo Branas
HTTP Interceptors com AngularJS
HTTP Interceptors com AngularJS
Rodrigo Branas
Criando serviços com AngularJS
Criando serviços com AngularJS
Rodrigo Branas
Criando Filtros com AngularJS
Criando Filtros com AngularJS
Rodrigo Branas
Criando aplicações Single-Page com AngularJS
Criando aplicações Single-Page com AngularJS
Rodrigo Branas
Mais de Rodrigo Branas
(20)
Clean Architecture
Clean Architecture
Node.js - #7 - Core Modules - http - Parte 1 - Rodrigo Branas
Node.js - #7 - Core Modules - http - Parte 1 - Rodrigo Branas
Node.js - #6 - Core Modules - net - Rodrigo Branas
Node.js - #6 - Core Modules - net - Rodrigo Branas
Node.js - #5 - Process - Rodrigo Branas
Node.js - #5 - Process - Rodrigo Branas
Node.js - #4 - Timers - Rodrigo Branas
Node.js - #4 - Timers - Rodrigo Branas
Node.js - #3 - Global Objects - Rodrigo Branas
Node.js - #3 - Global Objects - Rodrigo Branas
Node.js - #2 - Sistema de Módulos - Rodrigo Branas
Node.js - #2 - Sistema de Módulos - Rodrigo Branas
Node.js - #1 - Introdução - Rodrigo Branas
Node.js - #1 - Introdução - Rodrigo Branas
#6 - Git - Desfazendo as coisas
#6 - Git - Desfazendo as coisas
#1 - Git - Introdução
#1 - Git - Introdução
#4 - Git - Stash
#4 - Git - Stash
A evolução do AngularJS
A evolução do AngularJS
JavaScript - Date
JavaScript - Date
JavaScript - Expressões Regulares
JavaScript - Expressões Regulares
Automação de Testes com AngularJS
Automação de Testes com AngularJS
Scope AngularJS
Scope AngularJS
HTTP Interceptors com AngularJS
HTTP Interceptors com AngularJS
Criando serviços com AngularJS
Criando serviços com AngularJS
Criando Filtros com AngularJS
Criando Filtros com AngularJS
Criando aplicações Single-Page com AngularJS
Criando aplicações Single-Page com AngularJS
Último
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
AxelRicardoTrocheRiq
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
ABDERRAOUF MEHENNI
Clustering techniques data mining book ....
Clustering techniques data mining book ....
ShaimaaMohamedGalal
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
Wave PLM
DNT_Corporate presentation know about us
DNT_Corporate presentation know about us
Dynamic Netsoft
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Alberto González Trastoy
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
Fatema Valibhai
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
Arshad QA
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
Delhi Call girls
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
joe51371421
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
Andolasoft Inc
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
OnePlan Solutions
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
SolGuruz
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
harshavardhanraghave
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
MyIntelliSource, Inc.
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Evangelist Apps https://twitter.com/EvangelistSW/
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
Cionsystems
Último
(20)
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
Clustering techniques data mining book ....
Clustering techniques data mining book ....
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
DNT_Corporate presentation know about us
DNT_Corporate presentation know about us
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
#3 - Git - Branching e Merging
1.
Rodrigo Branas –
@rodrigobranas - http://www.agilecode.com.br #3 - Git - Branching e Merging
2.
Rodrigo Branas rodrigo.branas@agilecode.com.br http://www.agilecode.com.br • Arquiteto
de Software na Gennera • Professor na Agile Code • Autor na Java Magazine e PacktPub • Palestrante
3.
http://www.youtube.com/rodrigobranas
4.
O que é
um branch e quais são as vantagens de utilizá-lo?
5.
Um branch é
uma nova linha de desenvolvimento que permite isolar o código de uma nova funcionalidade, mantendo a linha base estável.
6.
É possível trocar
de branch facilmente, a qualquer momento
7.
Os commits podem
continuar contando a história do projeto
8.
O branch pode
ser sincronizado e compartilhado, evitando perdas
9.
Depois de trabalhar
no branch é necessário realizar um merge
10.
git branch
11.
12.
commit a9ae tree f4b3 parent master
13.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae master
14.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d master
15.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master
16.
git branch feature1
17.
18.
git branch
19.
20.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master
21.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1
22.
No Git, um
branch é apenas uma referência para um commit.
23.
cat .git/refs/heads/master cat .git/refs/heads/feature1
24.
25.
git log --oneline
--decorate
26.
27.
HEAD?
28.
cat .git/HEAD
29.
30.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1
31.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1HEAD
32.
git checkout feature1
33.
34.
cat .git/HEAD
35.
36.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1HEAD
37.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1 HEAD
38.
Criando um commit
no branch...
39.
echo d >
d.txt git add -A git commit -m "d.txt"
40.
41.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1 HEAD commit a42c tree ad86 parent b274
42.
git log --oneline
--decorate
43.
44.
Trocando de branch,
os arquivos são substituídos
45.
git checkout master ls
-la
46.
47.
git log --oneline
--decorate
48.
49.
git log --oneline
--decorate --all
50.
51.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1 HEAD commit a42c tree ad86 parent b274
52.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1 commit a42c tree ad86 parent b274 HEAD
53.
Realizando um merge
no master...
54.
git merge feature1
55.
56.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1 commit a42c tree ad86 parent b274 HEAD
57.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1 commit a42c tree ad86 parent b274 HEAD
58.
Fast-Forward
59.
A estratégia fast-forward
é apenas uma atualização da referência e só é possível quando não existe divergência entre os branches.
60.
git log --oneline
--decorate --all
61.
62.
git branch -d
feature1
63.
64.
git log --oneline
--decorate --all
65.
66.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature1 commit a42c tree ad86 parent b274 HEAD
67.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master commit a42c tree ad86 parent b274 HEAD
68.
Criando uma divergência
entre o master e o branch...
69.
git branch feature2 git
checkout feature2 ou git checkout -b feature2
70.
71.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master commit a42c tree ad86 parent b274 HEAD
72.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 HEAD
73.
echo e >
e.txt git add -A git commit -m "e.txt"
74.
75.
git log --oneline
--decorate --all
76.
77.
commit a9ae tree f4b3 parent commit
372d tree d11b parent a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 HEAD
78.
commit 372d tree d11b parent
a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 HEAD
79.
commit 372d tree d11b parent
a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD
80.
git checkout master
81.
82.
commit 372d tree d11b parent
a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD
83.
commit 372d tree d11b parent
a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD
84.
commit 372d tree d11b parent
a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD
85.
echo f >
f.txt git add -A git commit -m "f.txt"
86.
87.
commit 372d tree d11b parent
a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD
88.
commit 372d tree d11b parent
a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c
89.
git log --oneline
--decorate --all
90.
91.
git log --oneline
--decorate --all --graph
92.
93.
Realizando um merge...
94.
git merge feature2
95.
96.
97.
98.
commit 372d tree d11b parent
a9ae commit 7f64 tree 6300 parent 372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c
99.
commit 7f64 tree 6300 parent
372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c
100.
commit 7f64 tree 6300 parent
372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2
101.
Recursive
102.
A estratégia recursive
é utilizada quando existe divergência entre os branches e um commit para unir ambos se torna necessário.
103.
git log --oneline
--decorate --all --graph
104.
105.
git branch -d
feature2
106.
107.
commit 7f64 tree 6300 parent
372d commit b274 tree 15eb parent 7f64 master feature2 commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2
108.
commit 7f64 tree 6300 parent
372d commit b274 tree 15eb parent 7f64 master commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2
109.
E se der
conflito?
110.
git checkout -b
feature3
111.
112.
commit 7f64 tree 6300 parent
372d commit b274 tree 15eb parent 7f64 master commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2
113.
commit 7f64 tree 6300 parent
372d commit b274 tree 15eb parent 7f64 master commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3
114.
echo g2 >
g.txt git add -A git commit -m "g.txt"
115.
116.
commit b274 tree 15eb parent
7f64 master commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3
117.
commit b274 tree 15eb parent
7f64 master commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3 commit c5b5 tree 82b4 parent cc8a
118.
git log --oneline
--decorate --all --graph
119.
120.
git checkout master
121.
122.
commit b274 tree 15eb parent
7f64 master commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c HEAD commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3 commit c5b5 tree 82b4 parent cc8a
123.
commit b274 tree 15eb parent
7f64 master commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3 commit c5b5 tree 82b4 parent cc8a HEAD
124.
echo g1 >
g.txt git add -A git commit -m "g.txt"
125.
126.
commit b274 tree 15eb parent
7f64 master commit a42c tree ad86 parent b274 commit fde2 tree a025 parent a42c commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3 commit c5b5 tree 82b4 parent cc8a HEAD
127.
master commit a42c tree ad86 parent
b274 commit fde2 tree a025 parent a42c commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3 commit c5b5 tree 82b4 parent cc8a HEAD
128.
master commit a42c tree ad86 parent
b274 commit fde2 tree a025 parent a42c commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3 commit c5b5 tree 82b4 parent cc8a HEAD commit c85e tree a1bb parent cc8a
129.
git merge feature3
130.
131.
git status
132.
133.
git diff
134.
135.
vi g.txt
136.
137.
138.
139.
git add -A git
commit -m "g.txt"
140.
141.
master commit a42c tree ad86 parent
b274 commit fde2 tree a025 parent a42c commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3 commit c5b5 tree 82b4 parent cc8a HEAD commit c85e tree a1bb parent cc8a
142.
master commit a42c tree ad86 parent
b274 commit fde2 tree a025 parent a42c commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3 commit c5b5 tree 82b4 parent cc8a HEAD commit c85e tree a1bb parent cc8a commit 270e tree 82b4 parent c85e parent c5b5
143.
git log --oneline
--decorate --all --graph
144.
145.
git branch -d
feature3
146.
147.
master commit a42c tree ad86 parent
b274 commit fde2 tree a025 parent a42c commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 feature3 commit c5b5 tree 82b4 parent cc8a HEAD commit c85e tree a1bb parent cc8a commit 270e tree 82b4 parent c85e parent c5b5
148.
master commit a42c tree ad86 parent
b274 commit fde2 tree a025 parent a42c commit d67a tree 10e6 parent a42c commit cc8a tree 10e6 parent d67a parent fde2 commit c5b5 tree 82b4 parent cc8a HEAD commit c85e tree a1bb parent cc8a commit 270e tree 82b4 parent c85e parent c5b5
149.
Rodrigo Branas Site: http://www.agilecode.com.br Twitter:
@rodrigobranas Facebook: http://www.facebook.com/canalrodrigobranas SlideShare: http://www.slideshare.com/rodrigobranas YouTube: http://www.youtube.com/rodrigobranas LinkedIn: http://br.linkedin.com/in/rodrigobranas +Plus: https://plus.google.com/+RodrigoBranas GitHub: http://www.github.com/rodrigobranas
Baixar agora