Submit Search
Upload
#3 - Git - Branching e Merging
•
6 likes
•
1,027 views
Rodrigo Branas
Follow
Branching e Merging com Git.
Read less
Read more
Software
Report
Share
Report
Share
1 of 149
Download now
Download to read offline
Recommended
#2 - Git - DAG
#2 - Git - DAG
Rodrigo Branas
Use o git e perca o medo de errar
Use o git e perca o medo de errar
Bruno Calheira
Git advanced
Git advanced
Peter Vandenabeele
Git Terminologies
Git Terminologies
Yash
Git basics
Git basics
GHARSALLAH Mohamed
Git
Git
Shinu Suresh
A Practical Introduction to git
A Practical Introduction to git
Emanuele Olivetti
Git and GitHub
Git and GitHub
James Gray
Recommended
#2 - Git - DAG
#2 - Git - DAG
Rodrigo Branas
Use o git e perca o medo de errar
Use o git e perca o medo de errar
Bruno Calheira
Git advanced
Git advanced
Peter Vandenabeele
Git Terminologies
Git Terminologies
Yash
Git basics
Git basics
GHARSALLAH Mohamed
Git
Git
Shinu Suresh
A Practical Introduction to git
A Practical Introduction to git
Emanuele Olivetti
Git and GitHub
Git and GitHub
James Gray
Git training v10
Git training v10
Skander Hamza
Git and git flow
Git and git flow
Fran García
Starting with Git & GitHub
Starting with Git & GitHub
Nicolás Tourné
Advanced Git
Advanced Git
Sergiu-Ioan Ungur
Git and GitHub
Git and GitHub
Md. Ahsan Habib Nayan
Git github
Git github
Anurag Deb
Git One Day Training Notes
Git One Day Training Notes
glen_a_smith
Intro to git and git hub
Intro to git and git hub
Venkat Malladi
Minicurso GIT Completo (2022)
Minicurso GIT Completo (2022)
Danilo Pinotti
Intro to Git and GitHub
Intro to Git and GitHub
Panagiotis Papadopoulos
Git and Github
Git and Github
Teodora Ahkozidou
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Git 101
Git 101
Sachet Mittal
Git and github
Git and github
Sayantika Banik
Introduction git
Introduction git
Dian Sigit Prastowo
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
Git+github
Git+github
Guilherme Lima Pereira
Git - Level 2
Git - Level 2
민태 김
Introduction to Git
Introduction to Git
Colin Su
Learning git
Learning git
Sid Anand
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
More Related Content
What's hot
Git training v10
Git training v10
Skander Hamza
Git and git flow
Git and git flow
Fran García
Starting with Git & GitHub
Starting with Git & GitHub
Nicolás Tourné
Advanced Git
Advanced Git
Sergiu-Ioan Ungur
Git and GitHub
Git and GitHub
Md. Ahsan Habib Nayan
Git github
Git github
Anurag Deb
Git One Day Training Notes
Git One Day Training Notes
glen_a_smith
Intro to git and git hub
Intro to git and git hub
Venkat Malladi
Minicurso GIT Completo (2022)
Minicurso GIT Completo (2022)
Danilo Pinotti
Intro to Git and GitHub
Intro to Git and GitHub
Panagiotis Papadopoulos
Git and Github
Git and Github
Teodora Ahkozidou
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Git 101
Git 101
Sachet Mittal
Git and github
Git and github
Sayantika Banik
Introduction git
Introduction git
Dian Sigit Prastowo
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
Git+github
Git+github
Guilherme Lima Pereira
Git - Level 2
Git - Level 2
민태 김
Introduction to Git
Introduction to Git
Colin Su
Learning git
Learning git
Sid Anand
What's hot
(20)
Git training v10
Git training v10
Git and git flow
Git and git flow
Starting with Git & GitHub
Starting with Git & GitHub
Advanced Git
Advanced Git
Git and GitHub
Git and GitHub
Git github
Git github
Git One Day Training Notes
Git One Day Training Notes
Intro to git and git hub
Intro to git and git hub
Minicurso GIT Completo (2022)
Minicurso GIT Completo (2022)
Intro to Git and GitHub
Intro to Git and GitHub
Git and Github
Git and Github
Git - Basic Crash Course
Git - Basic Crash Course
Git 101
Git 101
Git and github
Git and github
Introduction git
Introduction git
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git+github
Git+github
Git - Level 2
Git - Level 2
Introduction to Git
Introduction to Git
Learning git
Learning git
Similar to #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
Similar to #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
More from 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
More from 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
Recently uploaded
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
itservices996
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
osttopstonverter
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
Bert Jan Schrijver
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
ABSYZ Inc
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
Shane Coughlan
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
Tier1 app
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
kalichargn70th171
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
Anthony Dahanne
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
Jean Silva
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
RTS corp
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
OnePlan Solutions
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
Roberto Pérez Alcolea
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
Shane Coughlan
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
manoharjgpsolutions
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
Safe Software
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
Lionel Briand
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
Andreas Kunz
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
OnePlan Solutions
Recently uploaded
(20)
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
VictoriaMetrics Anomaly Detection Updates: Q1 2024
VictoriaMetrics Anomaly Detection Updates: Q1 2024
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
#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
Download now