Git MERGE vs REBASE: The Definitive Guide

80,641
0
2023-08-29に共有
The better way to learn Git with live coding and motion graphics:
learngit.io/

Newsletter readers get my videos early: newsletter.themoderncoder.com/

----

This is the definitive tutorial for git rebase and git merge. We'll cover everything you'll need to know about how to use rebase and merge to streamline your version control workflow. Start by understanding the fundamentals of git merge: we'll cover 3-way merges, fast-forward merges and more. Then we'll then cover best practices for using git rebase in collaborative situations with other developers, and review common rebase pitfalls to avoid. We'll also explore some pro git rebase and merge workflow tips to help you master the most common git workflow.

CHAPTERS
0:00 Intro
0:18 Merging: 3-way merge
3:00 Merging: Fast-forward merge
4:47 Rebase
6:02 Merge & Rebase Workflow
6:41 Rebase Pitfalls

MY TECH
www.themoderncoder.com/wfh-nyc-desk-tour-2022/

MUSIC
Music from Uppbeat (free for Creators!):
uppbeat.io/t/danijel-zambo/stardust
License code: 0Y2YDUPOMXGYYQML

#git #rebase #merge #github #learngit #gitmerge #gitrebase #development #softwareengineering #programming #coding #versioncontrol #developer #technology #tutorial #stepbystepguide #gitrepository #vcs #programmingtips #codersofinstagram #codingcommunity #learnprogramming #softwaredevelopment #codingtutorial #gitexplained

コメント (21)
  • @azolee
    in my almost 15 year of using Git, this is by far the best video on how to use merge and rebase. thank you!
  • Great video. I've been using Git forever, and this is probably the best explanation I've ever seen of merge, rebase and fast-forward.
  • @celikvolkan
    Best explanation I have ever seen on YouTube about merge vs rebase. Thank you for sharing.😺
  • @rpf23543
    Probably the best videos about git, out there. The animations are a huge help. Thank you so much!
  • Thanks a lot! At last after several years using Git, I (think) I finally grasped it.
  • @matk2283
    Amazing tutorial !! really appreciate posting this tutorial explaining "git merge" and "git rebase"
  • @ariyaneghbal
    Your videos are the most clear I ever seen on this topic and still contains enough details
  • Crystal clear ! I'm glad I've found your channel and eager to discover more
  • @nanonkay5669
    I'd like to think of both as merging, but done differently. Here's how: "Git merge" from a current branch into the target branch is when Git takes the latest changes of the current branch, then take the latest changes of the target branch and combine them. The new combination is made into a new commit and placed as the latest commit of the target branch. Git will still keep around the history of all the commits that had been made up until the merge of either branch. "Git Rebase" from current branch into target branch is when Git first takes all the commits from the current branch, lines them up in the order they were made and puts them aside for now. Then Git takes the oldest commit from current branch and "merges" it with the latest commit on the target branch by doing it like a regular merge: combing the changes, make a new commit that represents those combined changes then places that new commit as the latest commit on the target branch. Then Git moves on the second oldest commit on the current branch and repeats the process. All the way until the latest commit of the current branch is merged. But remember, the current branch is still set aside, what will Git do with those commits that have effectively become duplicates? Git will just delete those commits, hence why history has been rewritten. Hope this helps
  • Excellent explanation and a nice, clean video. Well done. Subbed
  • As a single dev , I only ever use rebase amd NEVER merge just to keep the history strictly linear , however this is a luxury that larger teams might not have . The tip about only using rebase for your own local work is 100% the right way to use it , imo .
  • @erdemkosk
    This is the best git videos on youtube. This is amazing work. I am begging to you please move whole git with kind of videos
  • @ogreeni
    Great video! You seriously deserve more recognition.
  • @MarkW2711
    Excellent video, I've always been worried about using rebase, this helps massively