Git Merge vs Git Rebase

preview_player
Показать описание
In this video I walk through the differences between Git Merge and Git Rebase and my preferences in using both.

Gear:

Music by: Karl Casey @ White Bat Audio

Creative Commons — Attribution 3.0 Unported — CC BY 3.0

0:00 Intro
0:23 Git
3:31 Git Merge
8:43 Git Rebase
14:05 Preferences
15:09 Outro

#git #coding #programming
Рекомендации по теме
Комментарии
Автор

It was brought up that git storing "diffs" is incorrect. Git stores a stream of snapshots and other VCSs store diffs between files. Git will not save anything for files that didn't change and only stores these snapshot references. Sorry for any confusion!

ascourter
Автор

Great explanations! Just one tiny thing, C2 single quote, is known as C2 prime. The single quote is a notation called 'prime'! Hope this helps a bit :)

droopfpv
Автор

Thanks for clearing up the Git merge conflict text. Currently trying to get enrolled into app academy.

emmanuelvillarreal
Автор

I'd argue that you should always rebase all your branches on master before merging, but then merge with --no-fast-forward to have the merge commits. This way you still have clean history but see the merged PRs/branches.

krzyczak
Автор

Really great explanation Andrew! That tool looks really useful, definitely going to play around with it.

muronuck
Автор

Nice explanation. First minutes about git history are unnecessary - you are answering a specific question.

jan.kowalski
Автор

Git obviously been named for Linus Torvalds as well....

gwaptiva
Автор

Whoa?! You had to do a rebase from bugfix....then move over to main to merge? Huh? The pic on the right looks like the code was updated...but then you had to change branches and do the merge....what looks like....again. I'm a bit confused sorry. Doesn't the rebase do that already? If it doesn't, couldn't you just do a merge from Main, and get the exact same results?

phenry
Автор

git keeps a full blob for every version of every file and they all get downloaded onto your machine when you clone a repo.

henri-philippemarceau
Автор

Do you use Git Merge or Git Rebase more often?

ascourter