SlideShare a Scribd company logo
1
Confidential
Why is Git Rebase?
2
Confidential
Likhtman Hanna
IT experience over 8 years
Senior Software engineer in GlobalLogic
Architector. Wife. Mom. Founder of charity organisation. Mentor.
Traveler. Speaker. Overall a good person…
@h.likhtman
@Just0110
3
Confidential
AGENDA: System
V
1. There is no “bad” history…
Q&A
2. Why we ever need this rebase?
Q&A
3. Let’s add some interactive!
Q&A
4. And now to practice
5. Tips & Tricks
6. Kahoot!
S
Control
C
Version
SVC
+memes
4
Confidential
There is no “bad” history...
5
Confidential
…wrong!
6
Confidential
7
Confidential
8
Confidential
Task - Create a login modal form
1. Create modal
2. Create input
3. Create button
4. Create form (combine all together)
1. feat(login): create login form
2. feat(kit): create button
3. feat(kit): create input
4. feat(kit): create modal
fix(kit): change modal border radius
fix(kit): change button title
fix(kit): again change modal radius
fix(kit): final change of modal radius
fix(kit): add hooks for form
fix(kit): final final change of modal radius
9
9
Confidential
Q&A
10
Confidential
What is rebase?
11
Confidential
Why we ever need this rebase?
To do everything as clean as possible and never
worry if you have done a mistake or your commits
are not descriptive, because with git rebase we can
alter the history of the branch completely.
When developers discuss clean code,
they often mention the single
responsibility principle - S in SOLID.
Code history ALSO related to code!
12
Confidential
13
13
Confidential
Q&A
14
Confidential
Let’s add some interactive!
git rebase -i HEAD~N
or
git rebase --interactive HEAD~N
15
Confidential
Work with commit
16
Confidential
Work with branch
17
Confidential
Create backup before rebasing (if…WHEN something goes wrong)
1. before running a git rebase to resolve conflicts run git branch BACKUP
2. after completing the rebase run git diff BACKUP to see if you broke anything during
rebase
3. if done run git branch -D BACKUP
4. if something went wrong:
git checkout BACKUP && git branch -D "<my-branch>" && git branch -m "<my-branch>"
to restore your state before the failed rebase
18
Confidential
git branch BACKUP
git
branch
BACKUP
git branch BACKUP
g
i
t
b
r
a
n
c
h
B
A
C
K
U
P
19
19
Confidential
Q&A
20
20
Confidential
And now to practice….
almost
21
Confidential
Practice?
1. git add .
2. git commit --fixup=5819b5c
3. git rebase -i --autosquash 5819b5c~1
1. feat(kit): create modal
2. feat(kit): create input
3. feat(kit): create button
4. feat(login): create login form
fix(kit): change modal border radius
fix(kit): change button title
fix(kit): again change modal radius
fix(kit): final change of modal radius
fix(kit): add hooks for form
22
Confidential
fix(kit): change modal border radius
1. feat(kit): create modal
2. feat(kit): create input
3. feat(kit): create button
4. feat(login): create login form
23
23
Confidential
And now to practice….
24
Confidential
Tips & Tricks
1. git log --graph --decorate --pretty=oneline --abbrev-commit
2. git checkout main && git fetch --prune && git pull --rebase && git checkout - && git rebase -i main
3. git push --force-with-lease
4. git checkout BACKUP && git branch -D "<my-branch>" && git branch -m "<my-branch>"
git branch BACKUP
git
branch
BACKUP
git branch BACKUP
g
i
t
b
r
a
n
c
h
B
A
C
K
U
P
25
25
Confidential
Kahoot!
26
Confidential
Thank You

More Related Content

Similar to JavaScript Community Webinar #14 "Why Is Git Rebase?" (20)

PPTX
Gitting out of trouble
Jon Senchyna
 
PDF
Git For The Android Developer
Effective
 
PDF
Becoming a Git Master - Nicola Paolucci
Atlassian
 
PDF
Git basics
Surabhi Gupta
 
PDF
git session --interactive
Marius Colacioiu
 
PPTX
Gitlikeapro 2019
Jesús Miguel Benito Calzada
 
PDF
Bend time to your will with git
Chris Tankersley
 
PPTX
An introduction to Git
Muhil Vannan
 
PDF
git-commands-cheat-sheet-infopediya-com.pdf
murad khan
 
PDF
Git and Github slides.pdf
Tilton2
 
PDF
Git and Github workshop ppt slide by slide
RaghavendraVattikuti1
 
PPTX
Use Git like a pro - condensed
Jesús Miguel Benito Calzada
 
ODP
In Git we trust, by Carlos Guzman
Carlos Guzmán
 
PDF
Git rebase
SitaPrajapati
 
PDF
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
PDF
Advanced Git
Sergiu-Ioan Ungur
 
PPTX
Git workshop 33degree 2011 krakow
Luca Milanesio
 
PPTX
Get Good With Git
Hoffman Lab
 
PDF
Simplify writing code with deliberate commits
Joel Chippindale
 
PDF
GIT Basics
Tagged Social
 
Gitting out of trouble
Jon Senchyna
 
Git For The Android Developer
Effective
 
Becoming a Git Master - Nicola Paolucci
Atlassian
 
Git basics
Surabhi Gupta
 
git session --interactive
Marius Colacioiu
 
Bend time to your will with git
Chris Tankersley
 
An introduction to Git
Muhil Vannan
 
git-commands-cheat-sheet-infopediya-com.pdf
murad khan
 
Git and Github slides.pdf
Tilton2
 
Git and Github workshop ppt slide by slide
RaghavendraVattikuti1
 
Use Git like a pro - condensed
Jesús Miguel Benito Calzada
 
In Git we trust, by Carlos Guzman
Carlos Guzmán
 
Git rebase
SitaPrajapati
 
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
Advanced Git
Sergiu-Ioan Ungur
 
Git workshop 33degree 2011 krakow
Luca Milanesio
 
Get Good With Git
Hoffman Lab
 
Simplify writing code with deliberate commits
Joel Chippindale
 
GIT Basics
Tagged Social
 

More from GlobalLogic Ukraine (20)

PDF
GlobalLogic JavaScript Community Webinar #21 “Інтерв’ю без заспокійливих”
GlobalLogic Ukraine
 
PPTX
Deadlocks in SQL - Turning Fear Into Understanding (by Sergii Stets)
GlobalLogic Ukraine
 
PDF
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Ukraine
 
PDF
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Ukraine
 
PDF
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Ukraine
 
PDF
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic Ukraine
 
PPTX
Штучний інтелект як допомога в навчанні, а не замінник.pptx
GlobalLogic Ukraine
 
PPTX
Задачі AI-розробника як застосовується штучний інтелект.pptx
GlobalLogic Ukraine
 
PPTX
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
GlobalLogic Ukraine
 
PDF
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Ukraine
 
PDF
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic Ukraine
 
PPTX
Страх і сила помилок - IT Inside від GlobalLogic Education
GlobalLogic Ukraine
 
PDF
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic Ukraine
 
PDF
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic Ukraine
 
PDF
“How to Secure Your Applications With a Keycloak?
GlobalLogic Ukraine
 
PDF
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 
PPTX
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Ukraine
 
PDF
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic Ukraine
 
PDF
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
GlobalLogic Ukraine
 
PPTX
GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Ukraine
 
GlobalLogic JavaScript Community Webinar #21 “Інтерв’ю без заспокійливих”
GlobalLogic Ukraine
 
Deadlocks in SQL - Turning Fear Into Understanding (by Sergii Stets)
GlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Ukraine
 
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Ukraine
 
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic Ukraine
 
Штучний інтелект як допомога в навчанні, а не замінник.pptx
GlobalLogic Ukraine
 
Задачі AI-розробника як застосовується штучний інтелект.pptx
GlobalLogic Ukraine
 
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
GlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Ukraine
 
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic Ukraine
 
Страх і сила помилок - IT Inside від GlobalLogic Education
GlobalLogic Ukraine
 
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic Ukraine
 
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic Ukraine
 
“How to Secure Your Applications With a Keycloak?
GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Ukraine
 
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic Ukraine
 
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
GlobalLogic Ukraine
 
GlobalLogic Webinar "Introduction to Embedded QA"
GlobalLogic Ukraine
 
Ad

Recently uploaded (20)

PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Digital Circuits, important subject in CS
contactparinay1
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Ad

JavaScript Community Webinar #14 "Why Is Git Rebase?"