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
Basic Git Intro
Basic Git Intro
Yoad Snapir
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Intro to git and git hub
Intro to git and git hub
Venkat Malladi
Intro to Git and GitHub
Intro to Git and GitHub
Panagiotis Papadopoulos
Git e GitHub - Conceitos Básicos
Git e GitHub - Conceitos Básicos
Henrique Silvestre Souza
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
Basic Git Intro
Basic Git Intro
Yoad Snapir
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
Intro to git and git hub
Intro to git and git hub
Venkat Malladi
Intro to Git and GitHub
Intro to Git and GitHub
Panagiotis Papadopoulos
Git e GitHub - Conceitos Básicos
Git e GitHub - Conceitos Básicos
Henrique Silvestre Souza
Git and git flow
Git and git flow
Fran García
Introducción a git
Introducción a git
Keopx
Git - An Introduction
Git - An Introduction
Behzad Altaf
Git & GitLab
Git & GitLab
Gaurav Wable
Git n git hub
Git n git hub
Jiwon Baek
git, 이해부터 활용까지
git, 이해부터 활용까지
jylee1229
Git 101 for Beginners
Git 101 for Beginners
Anurag Upadhaya
Git real slides
Git real slides
Lucas Couto
Learning git
Learning git
Sid Anand
GIT Básico
GIT Básico
André Justi
Tutorial Git
Tutorial Git
UCLouvain ACM Student Chapter
Version Control & Git
Version Control & Git
Jason Byrne
Starting with Git & GitHub
Starting with Git & GitHub
Nicolás Tourné
Git and GitHub
Git and GitHub
Md. Ahsan Habib Nayan
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTree
Teerapat Khunpech
Github - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Lee Hanxue
Git Rebase vs Merge
Git Rebase vs Merge
Mariam Hakobyan
プログラミング勉強会「オトナのGit入門」
プログラミング勉強会「オトナのGit入門」
Yoshinori Yamanouchi
Gitのよく使うコマンド
Gitのよく使うコマンド
YUKI Kaoru
Getting Git Right
Getting Git Right
Sven Peters
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 and git flow
Git and git flow
Fran García
Introducción a git
Introducción a git
Keopx
Git - An Introduction
Git - An Introduction
Behzad Altaf
Git & GitLab
Git & GitLab
Gaurav Wable
Git n git hub
Git n git hub
Jiwon Baek
git, 이해부터 활용까지
git, 이해부터 활용까지
jylee1229
Git 101 for Beginners
Git 101 for Beginners
Anurag Upadhaya
Git real slides
Git real slides
Lucas Couto
Learning git
Learning git
Sid Anand
GIT Básico
GIT Básico
André Justi
Tutorial Git
Tutorial Git
UCLouvain ACM Student Chapter
Version Control & Git
Version Control & Git
Jason Byrne
Starting with Git & GitHub
Starting with Git & GitHub
Nicolás Tourné
Git and GitHub
Git and GitHub
Md. Ahsan Habib Nayan
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTree
Teerapat Khunpech
Github - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Lee Hanxue
Git Rebase vs Merge
Git Rebase vs Merge
Mariam Hakobyan
プログラミング勉強会「オトナのGit入門」
プログラミング勉強会「オトナのGit入門」
Yoshinori Yamanouchi
Gitのよく使うコマンド
Gitのよく使うコマンド
YUKI Kaoru
Getting Git Right
Getting Git Right
Sven Peters
What's hot
(20)
Git and git flow
Git and git flow
Introducción a git
Introducción a git
Git - An Introduction
Git - An Introduction
Git & GitLab
Git & GitLab
Git n git hub
Git n git hub
git, 이해부터 활용까지
git, 이해부터 활용까지
Git 101 for Beginners
Git 101 for Beginners
Git real slides
Git real slides
Learning git
Learning git
GIT Básico
GIT Básico
Tutorial Git
Tutorial Git
Version Control & Git
Version Control & Git
Starting with Git & GitHub
Starting with Git & GitHub
Git and GitHub
Git and GitHub
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTree
Github - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Git Rebase vs Merge
Git Rebase vs Merge
プログラミング勉強会「オトナのGit入門」
プログラミング勉強会「オトナのGit入門」
Gitのよく使うコマンド
Gitのよく使うコマンド
Getting Git Right
Getting Git Right
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
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
StefanoLambiase
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
Lionel Briand
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Rob Geurden
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
smiwainfosol
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
Envertis Software Solutions
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Drew Moseley
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
Hironori Washizaki
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
Christoph Pohl
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
FerryKemperman
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Cizo Technology Services
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Ahmed Mohamed
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
Safe Software
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
Alina Yurenko
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
Marharyta Nedzelska
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
RTS corp
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
Akihiro Suda
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
Andreas Kunz
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
vyaparkranti
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Natan Silnitsky
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Matt Ray
Recently uploaded
(20)
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
#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