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

PDF
How to Really Get Git
PDF
Git Tricks — git utilities that make life git easier
PDF
Don't fear the rebase
PPTX
Git like a pro EDD18 - Full edition
PPTX
Git rewriting git history
PDF
Git Rebase vs Merge
PPTX
MakingGitWorkForYou
PDF
Git tutorial
How to Really Get Git
Git Tricks — git utilities that make life git easier
Don't fear the rebase
Git like a pro EDD18 - Full edition
Git rewriting git history
Git Rebase vs Merge
MakingGitWorkForYou
Git tutorial

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

PPTX
Gitting out of trouble
PDF
Git For The Android Developer
PDF
Becoming a Git Master - Nicola Paolucci
PDF
Git basics
PDF
git session --interactive
PPTX
PDF
Bend time to your will with git
PPTX
An introduction to Git
PDF
git-commands-cheat-sheet-infopediya-com.pdf
PDF
Git and Github workshop ppt slide by slide
PDF
Git and Github slides.pdf
PPTX
Use Git like a pro - condensed
ODP
In Git we trust, by Carlos Guzman
PDF
Git rebase
PDF
Git Init (Introduction to Git)
PDF
Advanced Git
PPTX
Git workshop 33degree 2011 krakow
PPTX
Get Good With Git
PDF
Simplify writing code with deliberate commits
PDF
GIT Basics
Gitting out of trouble
Git For The Android Developer
Becoming a Git Master - Nicola Paolucci
Git basics
git session --interactive
Bend time to your will with git
An introduction to Git
git-commands-cheat-sheet-infopediya-com.pdf
Git and Github workshop ppt slide by slide
Git and Github slides.pdf
Use Git like a pro - condensed
In Git we trust, by Carlos Guzman
Git rebase
Git Init (Introduction to Git)
Advanced Git
Git workshop 33degree 2011 krakow
Get Good With Git
Simplify writing code with deliberate commits
GIT Basics
Ad

More from GlobalLogic Ukraine (20)

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

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Modernizing your data center with Dell and AMD
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Approach and Philosophy of On baking technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Electronic commerce courselecture one. Pdf
PDF
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
GamePlan Trading System Review: Professional Trader's Honest Take
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
Big Data Technologies - Introduction.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Reach Out and Touch Someone: Haptics and Empathic Computing
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MYSQL Presentation for SQL database connectivity
Modernizing your data center with Dell and AMD
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Approach and Philosophy of On baking technology
Spectral efficient network and resource selection model in 5G networks
Electronic commerce courselecture one. Pdf
cuic standard and advanced reporting.pdf

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