SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
BEING DANGEROUS WITH
GIT

BY YOUR GEEK FRIEND:
/
WHO IS THIS DUDE?
PHP, C, Go - programming language fanatic
open-source geek, Arch linux, DWM, ViM user
Author of
And I share my stuff
WHY YOU SHOULD CONSIDER USING
GIT
git is decentralized
git is small and fast
git does not store changes - it stores snapshots
git has a staging area
git is a new standard?
WORKFLOW
Git does not force any workflow, use what works best for
your team and project, even if you are working alone, git will
fit perfectly well.
WHAT MAY BE USEFUL TO KNOW
ABOUT GIT REPOSITORY
Here is a fresh repository
$l
s
HA
ED
bace
rnhs
cni
ofg
dsrpin
ecito
hos
ok
idx
ne
if
no
ojcs
bet
rf
es

guts:
WHEN TO USE REBASE OR MERGE
Use

to cleanup, prepare and keep up to date your
topic branches.
rebased topic branches or hotfixes
HOW TO PREVENT THIS FROM
HAPPENING?
gtlg-pet=nln -abe-omt
i o -rtyoeie -brvcmi

rebase your feature branches
EXAMPLE:
mdr~poet& c ~poet
ki /rjc & d /rjc
gtii
i nt
tuhLCNE
oc IES
gtadLCNE
i d IES
gtcmi -m'nta cmi -stlcne
i omt a iiil omt
e ies'
gtrmt adoii hts/gtu.o/srpoetgt
i eoe d rgn tp:/ihbcmue/rjc.i
gtceku - fauepoetbosrp
i hcot b etr/rjc-otta

After a while...

Do you want this to go into

production stream?
LETS REBASE
Interactively rebase 5 commits from HEAD
gtrbs -itrcieHA~
i eae -neatv ED5
At this point we can choose what to do with commits.
Rebase will rewind the chosen number of commits and
modify them accordingly to prefered changes.
Initially rebase will stop to rename the first commit, we
rename it properly:

Next, rebase will stop on "boostrap project" wich will have
two commits squashed
Now if we had pushed our commits to git repository in any
branch name, we could reference these commits with their
hashes. This way it could look like:

Since we haven't, we can just leave those as extra commit
messages
Finally, it will stop to rename "add feature x" commit, it is not
clear what feature we have added, lets fix it as well:

When we save and close it, rebase will finish
And instead of...

We have:

Which history log do you choose to see in production?
Before merging it back to master - make sure you are up to
date
gtfth
i ec
gtrbs oii/atr
i eae rgnmse
There are cases, when you may want to split a commit,
consider a situation:

So what we should do ? gtrbs - HA~
i eae i ED4
Set

for commit, which we want to split

Rebase will rewind, pick the commit for edit and pause. Now
lets reset one commit from the current HEAD

gtrstHA~
i ee ED
Lets see what we have in
gtsau
i tts

:
Add the first commit, which includes doctrine2 orm. We will
use
so we stage only a specific change.
gtad-pthcmoe.sn
i d -ac opsrjo
Hit to edit hunk

Now save and close it. We should have only needed changes
staged.
gtcmi - 'nld dcrn2omit poet
i omt m icue otie r no rjc'
Next, we have a front controller integration:
gtadscMApFototolrpppbi/
i d r/yp/rnCnrle.h ulc*
gtcmi - 'raefotcnrle'
i omt m cet rn otolr

Further more, lets commit phpunit
gtadppntxlds tss
i d hui.m.it et

And again patch a composer.json change:
gtad- cmoe.sn
i d p opsrjo
Hit to edit hunk

Now save and close it. We should have only needed changes
staged.
gtcmi - 'otta ppnttss
i omt m bosrp hui et'
And finally we have only behat stuff left.
gtadfaue cmoe.sn
i d etrs opsrjo
gtcmi - 'otta bhtmn fntoa tss
i omt m bosrp ea ik ucinl et'
gtrbs -cniu
i eae -otne

Thats it! Now we have:
Have fun and be hardcore! And ...

Do not be afraid of rebase, experiment on your branches,
keep branch backups if needed.
THANK YOU
powered by:

Weitere ähnliche Inhalte

Andere mochten auch

骨盆歪斜 姿勢不良惹的禍
骨盆歪斜 姿勢不良惹的禍骨盆歪斜 姿勢不良惹的禍
骨盆歪斜 姿勢不良惹的禍lys167
 
Aspectos legales. present.
Aspectos legales. present.Aspectos legales. present.
Aspectos legales. present.angevale
 
Achieving a New Level of Data Center Performance
Achieving a New Level of Data Center PerformanceAchieving a New Level of Data Center Performance
Achieving a New Level of Data Center PerformanceThe Internet of Things
 
26857 superconductivity cover (new)
26857 superconductivity cover (new) 26857 superconductivity cover (new)
26857 superconductivity cover (new) Karen Flores
 
Bài giảng mô phỏng mạch điện tử
Bài giảng mô phỏng mạch điện tửBài giảng mô phỏng mạch điện tử
Bài giảng mô phỏng mạch điện tửLE The Vinh
 
ACC 290 Final Exam 2015 version
ACC 290 Final Exam 2015 versionACC 290 Final Exam 2015 version
ACC 290 Final Exam 2015 versionseeddarcy
 
Advanced Exam Certificate
Advanced Exam CertificateAdvanced Exam Certificate
Advanced Exam CertificateTyler Ellis
 

Andere mochten auch (11)

Surat keterangan kematian 2
Surat keterangan kematian 2Surat keterangan kematian 2
Surat keterangan kematian 2
 
骨盆歪斜 姿勢不良惹的禍
骨盆歪斜 姿勢不良惹的禍骨盆歪斜 姿勢不良惹的禍
骨盆歪斜 姿勢不良惹的禍
 
Aspectos legales. present.
Aspectos legales. present.Aspectos legales. present.
Aspectos legales. present.
 
Achieving a New Level of Data Center Performance
Achieving a New Level of Data Center PerformanceAchieving a New Level of Data Center Performance
Achieving a New Level of Data Center Performance
 
Departemen agama
Departemen agamaDepartemen agama
Departemen agama
 
26857 superconductivity cover (new)
26857 superconductivity cover (new) 26857 superconductivity cover (new)
26857 superconductivity cover (new)
 
Bài giảng mô phỏng mạch điện tử
Bài giảng mô phỏng mạch điện tửBài giảng mô phỏng mạch điện tử
Bài giảng mô phỏng mạch điện tử
 
File pak jai
File pak jaiFile pak jai
File pak jai
 
Joe Cherng_7
Joe Cherng_7Joe Cherng_7
Joe Cherng_7
 
ACC 290 Final Exam 2015 version
ACC 290 Final Exam 2015 versionACC 290 Final Exam 2015 version
ACC 290 Final Exam 2015 version
 
Advanced Exam Certificate
Advanced Exam CertificateAdvanced Exam Certificate
Advanced Exam Certificate
 

Ähnlich wie Being dangerous with git

How to Really Get Git
How to Really Get GitHow to Really Get Git
How to Really Get GitSusan Tan
 
Introduction of Git
Introduction of GitIntroduction of Git
Introduction of GitWayne Chen
 
git-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdfgit-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdfmurad khan
 
Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...
Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...
Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...Geshan Manandhar
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practiceMajid Hosseini
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptxHitesh670643
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger
 
git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)Carlos Duarte do Nascimento
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messesKatie Sylor-Miller
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshellalignan
 
Git 101 - An introduction to Version Control using Git
Git 101 - An introduction to Version Control using Git Git 101 - An introduction to Version Control using Git
Git 101 - An introduction to Version Control using Git John Tighe
 
Git tutorial
Git tutorialGit tutorial
Git tutorialmobaires
 
Git with the flow
Git with the flowGit with the flow
Git with the flowDana White
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221Shinho Kang
 

Ähnlich wie Being dangerous with git (20)

How to Really Get Git
How to Really Get GitHow to Really Get Git
How to Really Get Git
 
Introduction of Git
Introduction of GitIntroduction of Git
Introduction of Git
 
Git best practices workshop
Git best practices workshopGit best practices workshop
Git best practices workshop
 
git-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdfgit-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdf
 
Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...
Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...
Do You Git Your Code? Follow Simplified Gitflow Branching Model to Improve Pr...
 
Git basics 2
Git basics 2Git basics 2
Git basics 2
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
 
Git more
Git moreGit more
Git more
 
git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)
 
Git-ing out of your git messes
Git-ing out of  your git messesGit-ing out of  your git messes
Git-ing out of your git messes
 
Git hooks
Git hooksGit hooks
Git hooks
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
 
Git 101 - An introduction to Version Control using Git
Git 101 - An introduction to Version Control using Git Git 101 - An introduction to Version Control using Git
Git 101 - An introduction to Version Control using Git
 
Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)Introduction to Git (Greg Lonnon)
Introduction to Git (Greg Lonnon)
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Git with the flow
Git with the flowGit with the flow
Git with the flow
 
Honestly Git Playground 20190221
Honestly Git Playground 20190221Honestly Git Playground 20190221
Honestly Git Playground 20190221
 
Use Git like a pro - condensed
Use Git like a pro - condensedUse Git like a pro - condensed
Use Git like a pro - condensed
 

Kürzlich hochgeladen

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Kürzlich hochgeladen (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Being dangerous with git

  • 1. BEING DANGEROUS WITH GIT BY YOUR GEEK FRIEND: /
  • 2. WHO IS THIS DUDE? PHP, C, Go - programming language fanatic open-source geek, Arch linux, DWM, ViM user Author of And I share my stuff
  • 3. WHY YOU SHOULD CONSIDER USING GIT git is decentralized git is small and fast git does not store changes - it stores snapshots git has a staging area git is a new standard?
  • 4. WORKFLOW Git does not force any workflow, use what works best for your team and project, even if you are working alone, git will fit perfectly well.
  • 5. WHAT MAY BE USEFUL TO KNOW ABOUT GIT REPOSITORY Here is a fresh repository $l s HA ED bace rnhs cni ofg dsrpin ecito hos ok idx ne if no ojcs bet rf es guts:
  • 6. WHEN TO USE REBASE OR MERGE Use to cleanup, prepare and keep up to date your topic branches. rebased topic branches or hotfixes
  • 7. HOW TO PREVENT THIS FROM HAPPENING? gtlg-pet=nln -abe-omt i o -rtyoeie -brvcmi rebase your feature branches
  • 8. EXAMPLE: mdr~poet& c ~poet ki /rjc & d /rjc gtii i nt tuhLCNE oc IES gtadLCNE i d IES gtcmi -m'nta cmi -stlcne i omt a iiil omt e ies' gtrmt adoii hts/gtu.o/srpoetgt i eoe d rgn tp:/ihbcmue/rjc.i gtceku - fauepoetbosrp i hcot b etr/rjc-otta After a while... Do you want this to go into production stream?
  • 9. LETS REBASE Interactively rebase 5 commits from HEAD gtrbs -itrcieHA~ i eae -neatv ED5
  • 10. At this point we can choose what to do with commits. Rebase will rewind the chosen number of commits and modify them accordingly to prefered changes.
  • 11. Initially rebase will stop to rename the first commit, we rename it properly: Next, rebase will stop on "boostrap project" wich will have two commits squashed
  • 12. Now if we had pushed our commits to git repository in any branch name, we could reference these commits with their hashes. This way it could look like: Since we haven't, we can just leave those as extra commit messages
  • 13. Finally, it will stop to rename "add feature x" commit, it is not clear what feature we have added, lets fix it as well: When we save and close it, rebase will finish
  • 14. And instead of... We have: Which history log do you choose to see in production?
  • 15. Before merging it back to master - make sure you are up to date gtfth i ec gtrbs oii/atr i eae rgnmse
  • 16. There are cases, when you may want to split a commit, consider a situation: So what we should do ? gtrbs - HA~ i eae i ED4
  • 17. Set for commit, which we want to split Rebase will rewind, pick the commit for edit and pause. Now lets reset one commit from the current HEAD gtrstHA~ i ee ED
  • 18. Lets see what we have in gtsau i tts :
  • 19. Add the first commit, which includes doctrine2 orm. We will use so we stage only a specific change. gtad-pthcmoe.sn i d -ac opsrjo
  • 20. Hit to edit hunk Now save and close it. We should have only needed changes staged. gtcmi - 'nld dcrn2omit poet i omt m icue otie r no rjc'
  • 21. Next, we have a front controller integration: gtadscMApFototolrpppbi/ i d r/yp/rnCnrle.h ulc* gtcmi - 'raefotcnrle' i omt m cet rn otolr Further more, lets commit phpunit gtadppntxlds tss i d hui.m.it et And again patch a composer.json change: gtad- cmoe.sn i d p opsrjo
  • 22. Hit to edit hunk Now save and close it. We should have only needed changes staged. gtcmi - 'otta ppnttss i omt m bosrp hui et'
  • 23. And finally we have only behat stuff left. gtadfaue cmoe.sn i d etrs opsrjo gtcmi - 'otta bhtmn fntoa tss i omt m bosrp ea ik ucinl et' gtrbs -cniu i eae -otne Thats it! Now we have:
  • 24. Have fun and be hardcore! And ... Do not be afraid of rebase, experiment on your branches, keep branch backups if needed.