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
Git advanced
Git advanced
Peter Vandenabeele
Github - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Lee Hanxue
Introduction git
Introduction git
Dian Sigit Prastowo
Intro to git and git hub
Intro to git and git hub
Venkat Malladi
Advanced Git
Advanced Git
Sergiu-Ioan Ungur
Tutorial Git
Tutorial Git
UCLouvain ACM Student Chapter
Git basics
Git basics
GHARSALLAH Mohamed
Recommended
#2 - Git - DAG
#2 - Git - DAG
Rodrigo Branas
Git advanced
Git advanced
Peter Vandenabeele
Github - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Lee Hanxue
Introduction git
Introduction git
Dian Sigit Prastowo
Intro to git and git hub
Intro to git and git hub
Venkat Malladi
Advanced Git
Advanced Git
Sergiu-Ioan Ungur
Tutorial Git
Tutorial Git
UCLouvain ACM Student Chapter
Git basics
Git basics
GHARSALLAH Mohamed
Git n git hub
Git n git hub
Jiwon Baek
Git training v10
Git training v10
Skander Hamza
Git 101 for Beginners
Git 101 for Beginners
Anurag Upadhaya
Git branching strategies
Git branching strategies
jstack
Git
Git
Khulna University of Engineering & Tecnology
A Practical Introduction to git
A Practical Introduction to git
Emanuele Olivetti
15分でわかるGit入門
15分でわかるGit入門
to_ueda
Introducción a git
Introducción a git
Mariano Kfuri
Git and github 101
Git and github 101
Senthilkumar Gopal
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
WorkShop: Introducción a GIT
WorkShop: Introducción a GIT
Keopx
git - eine praktische Einführung
git - eine praktische Einführung
Marcel Eichner
Git for beginners
Git for beginners
Arulmurugan Rajaraman
Comparison of SVN and Git
Comparison of SVN and Git
Daniel Wieth
Git & GitHub WorkShop
Git & GitHub WorkShop
SheilaJimenezMorejon
Git and github
Git and github
Sayantika Banik
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
민태 김
Introdução ao Git
Introdução ao Git
Walmyr Carvalho
Learning git
Learning git
Sid Anand
Git Started With Git
Git Started With Git
Nick Quaranto
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 n git hub
Git n git hub
Jiwon Baek
Git training v10
Git training v10
Skander Hamza
Git 101 for Beginners
Git 101 for Beginners
Anurag Upadhaya
Git branching strategies
Git branching strategies
jstack
Git
Git
Khulna University of Engineering & Tecnology
A Practical Introduction to git
A Practical Introduction to git
Emanuele Olivetti
15分でわかるGit入門
15分でわかるGit入門
to_ueda
Introducción a git
Introducción a git
Mariano Kfuri
Git and github 101
Git and github 101
Senthilkumar Gopal
Git - Basic Crash Course
Git - Basic Crash Course
Nilay Binjola
WorkShop: Introducción a GIT
WorkShop: Introducción a GIT
Keopx
git - eine praktische Einführung
git - eine praktische Einführung
Marcel Eichner
Git for beginners
Git for beginners
Arulmurugan Rajaraman
Comparison of SVN and Git
Comparison of SVN and Git
Daniel Wieth
Git & GitHub WorkShop
Git & GitHub WorkShop
SheilaJimenezMorejon
Git and github
Git and github
Sayantika Banik
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
민태 김
Introdução ao Git
Introdução ao Git
Walmyr Carvalho
Learning git
Learning git
Sid Anand
Git Started With Git
Git Started With Git
Nick Quaranto
What's hot
(20)
Git n git hub
Git n git hub
Git training v10
Git training v10
Git 101 for Beginners
Git 101 for Beginners
Git branching strategies
Git branching strategies
Git
Git
A Practical Introduction to git
A Practical Introduction to git
15分でわかるGit入門
15分でわかるGit入門
Introducción a git
Introducción a git
Git and github 101
Git and github 101
Git - Basic Crash Course
Git - Basic Crash Course
WorkShop: Introducción a GIT
WorkShop: Introducción a GIT
git - eine praktische Einführung
git - eine praktische Einführung
Git for beginners
Git for beginners
Comparison of SVN and Git
Comparison of SVN and Git
Git & GitHub WorkShop
Git & GitHub WorkShop
Git and github
Git and github
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
버전관리를 들어본적 없는 사람들을 위한 DVCS - Git
Introdução ao Git
Introdução ao Git
Learning git
Learning git
Git Started With Git
Git Started With 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 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
Did you git yet?
Did you git yet?
Michael Fong
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 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
Did you git yet?
Did you git yet?
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
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
soniya singh
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
MyIntelliSource, Inc.
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
Arshad QA
Professional Resume Template for Software Developers
Professional Resume Template for Software Developers
Vinodh Ram
Software Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
Arshad QA
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
shikhaohhpro
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
Wave PLM
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
ABDERRAOUF MEHENNI
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
ComplianceQuest1
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
Fatema Valibhai
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ICS
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
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
bodapatigopi8531
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Evangelist Apps https://twitter.com/EvangelistSW/
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
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
stazi3110
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
gurkirankumar98700
DNT_Corporate presentation know about us
DNT_Corporate presentation know about us
Dynamic Netsoft
Recently uploaded
(20)
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
Professional Resume Template for Software Developers
Professional Resume Template for Software Developers
Software Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
DNT_Corporate presentation know about us
DNT_Corporate presentation know about us
#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