@legitalgorithmswithpeter: Git Merge vs Git Rebase 🔀 Both combine branch changes, but they handle history very differently. 🔀 Git Merge combines two histories without rewriting existing commits. If branches diverged, Git may create a merge commit with two parents. ♻️ Git Rebase takes your feature commits and reapplies them on top of the latest base, creating a cleaner, more linear history. But there’s a catch: rebase rewrites history, so rebased commits get new commit IDs. That’s why rebasing shared branches can cause problems. If you already pushed the branch, you may need: git push --force-with-lease For conflicts: * Merge → resolve → git merge --continue * Rebase → resolve → git rebase --continue * Cancel rebase → git rebase --abort The simple rule: Merge = preserve history Rebase = rewrite history for a cleaner timeline Use rebase carefully on shared branches. 🚀 #Git #GitMerge #GitRebase #GitHub #SoftwareDevelopment

algorithmswithpeter
algorithmswithpeter
Open In TikTok:
Region: US
Wednesday 23 September 2026 19:05:42 GMT
173820
8438
82
556

Music

Download

Comments

lifeofcoleton
Coleton 👨🏻‍💻 Indie iOS Dev :
Always rebase. Linear history.
2026-09-23 23:38:30
90
drongobeats
george pimbermile :
i dont think ill ever use rebase. i cant grasp how its useful over merging even with this explanation. unless u have really messy repos with many users maybe?
2026-09-24 01:47:01
7
miniiswayy
Iv :
“Claude make sure my shiii up to date” boom
2026-09-23 21:30:45
203
missionmike
missionmike :
squash and merge, moving on
2026-09-24 03:50:57
19
zachm725
Zach M :
Just commit to main. Much easier.
2026-09-23 20:43:09
45
alias_x201
sheufjej383 :
git merge just works, git rebase causes conflicts.
2026-09-24 08:44:20
15
riptide_one
Riptide :
you need a PhD in version control to master git
2026-09-24 00:33:38
16
nickwhite57
Nick :
Rebase before PR then merge with PR keeps history cleaner and easy to follow history
2026-09-24 06:44:00
16
user9283873778
username :
Why do you ever need the history of parents
2026-09-23 20:26:39
9
fasi797
fasi797 :
Realistically it's much more of a cultural / preference thing.
2026-09-23 21:01:26
3
user2848477283
adminnoy7tz :
Based my entire career around talking down to senior engineers who couldn’t handle this concept.
2026-09-24 01:26:49
1
wirosableng326
Wiro Sableng :
I'm a solo dev, I push changes to main directly
2026-09-25 11:49:56
11
mihaicris01
Mihai :
use jujutsu instead
2026-09-24 18:09:44
1
kelekelio
Kelekelio 🇪🇺 :
I don’t think I have ever used rebase. 🤔
2026-09-24 20:38:48
2
the_lord_of_noldor
finwé :
after rebase you have to merge
2026-09-24 04:37:15
0
fardarterfu
Fardarterfu :
I’m not using with lease. Nobody should be on my branch
2026-09-23 21:04:00
18
iulian.p46
Iulian P :
never used rebase
2026-09-24 12:23:21
5
sebas0ft
sebasoft :
almost never rebase. the history means accountability
2026-09-25 03:24:40
1
fullmoonyeah
AJ P :
git rebase = your commit is the latest git merge = their commit is the latest
2026-09-24 08:27:40
2
dalivalibg
dalivalibg :
am i the only one whose pull origin, resolve the conflict etc
2026-09-24 19:01:35
2
fullmoonyeah
AJ P :
git rebase is a merge where your commit in the working branch will be the top commit while merge will put the commits of other branch on the top of your commit
2026-09-24 08:26:09
1
kobewild
Kobe Wild :
Thanks I needed this. Everybody keeps asking about what is rebate do I simply didn’t use it because it seemed too dangerous now I can answer this stupid interview question but I still won’t use it.
2026-09-23 21:08:23
2
elvonsodecadio
Elvonso de cardio :
... i never use merge, direct rebase main ini my branch🗿
2026-09-24 07:35:32
1
user881620123
user881620123 :
not in a million year would i imagine petter griffin would be the one teaching me about git
2026-09-24 07:47:19
1
novagaming77ni
novagaming77ni 🇬🇧 🇬🇧 🇬🇧 :
It’s a wonder Seth not gotten this taking down
2026-09-23 21:41:10
0
To see more videos from user @legitalgorithmswithpeter, please go to the Tikwm homepage.

Other Videos


About