Resolve Git MERGE CONFLICTS: The Definitive Guide

Поділитися
Вставка
  • Опубліковано 15 чер 2024
  • 👨‍💻 The better way to learn Git: learngit.io/
    This is the definitive tutorial on how to resolve merge conflicts in Git. We'll cover why merge conflicts happen, and learn how to fix the two most common types of conflicts. This video covers resolving conflicts using command line Git (and a terminal text editor like VIM) as well as an IDE like VS Code. At the end of this video, I also share a cheatsheet you can use to solve merge conflicts.
    ----
    CHAPTERS
    0:00 Intro
    0:20 Why Merge Conflicts Happen
    1:45 How to Resolve Merge Conflicts using the Command Line
    6:20 Resolve Merge Conflicts with VS Code
    7:10 Merge Conflicts Cheat Sheet
    MY TECH
    www.themoderncoder.com/wfh-ny...
    MUSIC
    Music from Uppbeat (free for Creators!):
    uppbeat.io/t/danijel-zambo/st...
    License code: APXH7KJUQMMHJF3Q
    ICON CREDITS
    Boxer icons created by Freepik - Flaticon
    www.flaticon.com/free-icons/b...
    #git #merge #learngit #mergeconflicts #github #gitmerge #gitrebase #development #softwareengineering #programming #coding #versioncontrol #developer #technology #tutorial #stepbystepguide #gitrepository #vcs #programmingtips #codersofinstagram #codingcommunity #learnprogramming #softwaredevelopment #codingtutorial #gitexplained

КОМЕНТАРІ • 50

  • @DJRanoia
    @DJRanoia Місяць тому +14

    Dont forget a `git stash pop` to bring back your changes you stashed

  • @davidpaez_co
    @davidpaez_co 10 днів тому +1

    This is honestly the best git course in all UA-cam. Thank you so much!

  • @soadsam
    @soadsam 3 місяці тому +10

    wow something that would stress me OUT at work was made so simple by you in less than 10 minutes. seriously appreciate it 🙏

    • @themoderncoder
      @themoderncoder  3 місяці тому +2

      That’s awesome. Thanks for letting me know 😊

  • @AkimboFennec
    @AkimboFennec 29 днів тому +3

    I read the official pro git textbook, but did not understand what i should have done with the conflict. Then i searched for git merge conflict and found your UA-cam channel. Thank you for this video. The only recommendation is to speak a little bit slower, to give us time to digest the information. Other than that I really loved the combination of an animated graph, which underpins the theory, and a practical conflict resolution using a manual process, or VScode. Again thank you. By the way i will checkout the website and purchase the git course.

    • @themoderncoder
      @themoderncoder  29 днів тому +1

      Appreciate that! Definitely check out the course. Pacing is not the only reason, but I feel more comfortable taking my time and going really deep in the LearnGit.io lessons. YT seems to favor those shorter, punchier style videos (and I agree) they’re not always the right fit, especially for the more complicated Git concepts.

  • @SwedeOfEnbound
    @SwedeOfEnbound 4 місяці тому +2

    This is a world class example of how education should be; a very well produced video to support the subject! Take a look at it again how it interacts perfectly with the spoken words. But on the git merge topic, I have a lot of experience resolving conflicts but still wanted to further improve the particular skill and see what this video might give me - but while this vid was not for me this time I will definitely spread it to those who need it. And if you are one of those who do, you found the right video yourself now. Trust me.
    Thanks. Keep it up! (Everyone!)

    • @themoderncoder
      @themoderncoder  3 місяці тому +1

      Really appreciate your nice note, and even more so for sharing video with others who’d find it helpful. Cheers!

  • @porchmail
    @porchmail 22 дні тому

    Truly appreciate! This is one of the best IT tutorial videos that I’ve ever seen!

  • @AK-vx4dy
    @AK-vx4dy 4 місяці тому +2

    You bought my by show how to abort merge right away 😳
    Great job, nice level of knowledge for many, keep going.

  • @asishkumarmahapatra6245
    @asishkumarmahapatra6245 3 місяці тому

    love to watch your videos always and a big thumbs-up as always

  • @mxsniper223
    @mxsniper223 8 днів тому

    شكرا جزيلا .. thanks' a lot man

  • @fwostedfwakes733
    @fwostedfwakes733 6 місяців тому +2

    Such a helpful channel! Easy to digest with the visuals and cli side by side. Shoutout to Odin Project for recommending me this channel.

    • @themoderncoder
      @themoderncoder  6 місяців тому +3

      Welcome, I didn't know my videos were referenced by The Odin Project - that's super cool! Where in the curriculum did you find me? I'd love to get involved more with the Odin Project, it feels like my videos could be a good free supplement to some of their written content on Git

  • @gloriousbachycactus6403
    @gloriousbachycactus6403 4 місяці тому

    Great video, helped a lot! Thanks

  • @farhaannishtar786
    @farhaannishtar786 2 місяці тому +1

    love the quality vid man

  • @user-eq4zl8mq7k
    @user-eq4zl8mq7k 28 днів тому

    thank you so much. this has been the clearest explanation I`ve encountered. I have a test soon about this topic, and also need it currently for another school project :)) but solving the conflict on the terminal always seemed so intimidating

  • @naveedbhuiyan9855
    @naveedbhuiyan9855 6 місяців тому

    that was very helpful. Thanks a lot :D

  • @SalvadorAguilar
    @SalvadorAguilar 17 днів тому

    Thank you a lot for this brother!

    • @themoderncoder
      @themoderncoder  17 днів тому

      For sure, glad it was helpful. If you know anyone else who would benefit, please share a link!

  • @ic_1234
    @ic_1234 Місяць тому

    very nice, sir, thanks!!!

  • @levaryazan
    @levaryazan 7 місяців тому

    Amazing! It always surprises me how good your videos are. I am a Java developer from Russia, with only a year and a half of experience. I took several courses on working with Git. But I still don't fully understand many nuances of the work. But your videos are very helpful to understand. I have no doubt that there is a lot of work behind the seeming simplicity. Because first to plan, and then to convey the meaning so clearly and simply - there is a huge strain and work behind it. Thank you for what you are doing! And sorry for my English))

    • @themoderncoder
      @themoderncoder  7 місяців тому +1

      Thank you for recognizing the effect that goes into these videos! It is A LOT of work, but honestly, comments like yours are incredibly motivating. I would be awesome if you were to check out LearnGit (waitlist.learngit.io/) if you had some time. I'd love to create the best Git course on the internet, that solves the issues you mention with other Git courses. Cheers!

  • @matk2283
    @matk2283 3 місяці тому

    outstanding tutorial on merge conflict. much appreciated for posting this.
    Mathew. K from Colorado

  • @raimerencarnacion1238
    @raimerencarnacion1238 2 місяці тому

    Very useful.

  • @SunsetNova
    @SunsetNova 6 місяців тому

    Great thanks

  • @elzabethtatcher9570
    @elzabethtatcher9570 7 місяців тому +1

    Very informative. I always use my ide to to commits and pushes, because git is a pain if you only want to commit a portion of changes. IDE handles stashes in background.

    • @themoderncoder
      @themoderncoder  7 місяців тому

      Very true. I think the majority of engineers (myself included) have adopted a hybrid workflow like you mentioned

  • @realsnsar
    @realsnsar 7 місяців тому +1

    what a tutorial !

  • @radouane5376
    @radouane5376 2 місяці тому

    thanks

  • @joeybasile1572
    @joeybasile1572 4 місяці тому

    Thanks boss

  • @jessephillips8319
    @jessephillips8319 6 місяців тому

    This was a great step one, you understood change A and change B and we're able to bring them together.
    Any chance you could do a video on what to do when you don't understand change B? This ultimately gets into atomic commits and possibly the blame tool. Wish IDE's did their job and made this easier.

    • @themoderncoder
      @themoderncoder  6 місяців тому

      Good suggestion. I agree, it’s not so easy when the merge conflicts get more complicated and you don’t have expertise on some of the files in conflict

  • @theherk
    @theherk 2 місяці тому

    These videos are superb, but if I could only one bit of hopefully constructive feedack, it is about your commit messages. There is a reason the kernel requires imperative commits and why auto-generated merge commits say "Merge" and not "Merged". This way, a commit says what will happen by applying a patch.
    It is a small thing, and not a hardfast rule, but have you considered using imperative commits?

    • @themoderncoder
      @themoderncoder  2 місяці тому

      You’re absolutely right - I’m a little lazy on my commit messages and I can definitely do better there.

  • @jojje3000-1
    @jojje3000-1 19 днів тому

    Git mergetool is also useful

  • @ronaldpaek
    @ronaldpaek 7 місяців тому

    I love this, I been on the waitlist and eagerly waiting for the platform to come out, is it still planned to come out before the end of the year? ❤

    • @themoderncoder
      @themoderncoder  7 місяців тому +1

      Hey! Thanks for subscribing to the waitlist and following the ups-and-downs of this project. Yes! I'm still shooting for end of year, and actually the November newsletter (should go out tomorrow *fingers crossed*) talks a lot about launch expectations. But, I think a recent realization is that I need to be treating LearnGit as more of a partnership between folks like yourself and me as I build this out. If you read the newsletter, and have any suggestions or want to chat, hit me up.

    • @ronaldpaek
      @ronaldpaek 7 місяців тому

      @@themoderncoderthanks for the quick reply and update! No problem, I know u had some issues with flooding and stuff like that which set you back, I hope everything is good for you now, no problem was just curious, I understand though you would probably want at least 50% or something significant to show before launching of a early release on a website, I’m just excited cause I haven’t seen a really seen an interactive site for git except learngitbranching and your videos/content is very nice, hoping your interactive website once release will give me more confidence in the more advanced git commands ❤

    • @themoderncoder
      @themoderncoder  7 місяців тому +1

      You’re absolutely spot on. I think I’ve been too laser focused trying to achieve perfection because I was scared to release something that feel short of the vision on my head. I should’ve been focused on iterating quickly out in the open with you and the rest of the folks who want a service like this. I’m hoping to do that and get some good communication going in the process. But yeah, you hit the nail on the head.

    • @r.faj.5636
      @r.faj.5636 7 місяців тому

      @@themoderncoder Hi man. Thanks so much for the git tutorials. It's been very helpful for collaborating with my friend on a project. You manage to not get lost in the details while still being concise in what commands are doing. I appreciate the work that went into this. I hope the website launch goes well :D

    • @themoderncoder
      @themoderncoder  7 місяців тому +1

      Thank you! It’s a big project but I feel pretty confident in the content. If you’re up for being an early adopter, it would be great to get your thoughts on the site when it launches

  • @FallenStarFeatures
    @FallenStarFeatures 2 місяці тому

    TL;DW: git status
    TL;DW: You are in a maze of twisty little passages, all alike.

  • @rickymartin181
    @rickymartin181 3 місяці тому

    Its a great video. I am going through the videos and it is helping me in understanding Git alot better.
    Just a doubt, what if the changes causing conflict does not belong to us. Could you please resolve that issue as well.
    Thanks :)

    • @themoderncoder
      @themoderncoder  3 місяці тому +1

      If the changes don’t belong to you, you’d have to talk to the original author if you’re not sure how to resolve. But once you do that, since you’re the one initiating the merge, you’d need to make the changes and resolve the conflict.

    • @rickymartin181
      @rickymartin181 3 місяці тому

      @@themoderncoder thank you so much for the reply. 🙌🏻

    • @themoderncoder
      @themoderncoder  3 місяці тому

      @@rickymartin181 np

  • @kaibe5241
    @kaibe5241 10 днів тому

    This isn't even close to being definitive... It skips over so many features that git provides for managing conflicts.