1.9: Resolving Merge Conflicts - Git and GitHub for Poets

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ธ.ค. 2024

ความคิดเห็น • 189

  • @abcd123906
    @abcd123906 3 ปีที่แล้ว +71

    All teachers the world over take note! This is the CORRECT way to teach a subject. Thank you!!!!

    • @QueArgh
      @QueArgh 3 ปีที่แล้ว +5

      Depends on personal preference.
      For me this guy is too animated and distracts from the content.
      Prefer people who are concise and get to the point faster

  • @bso516
    @bso516 ปีที่แล้ว +1

    The energy level is just perfect to keep my attention on the videos

  • @paulmutiso1440
    @paulmutiso1440 2 ปีที่แล้ว +1

    I now understand why you have all those subscribers.
    I was having issues merging two different branches
    That's one of the best ways to teach
    Thank you so much

  • @alaoabiodun8575
    @alaoabiodun8575 4 ปีที่แล้ว +2

    wow, I have never watch tutorial so interactive and much fun like this in other tutorials, I was able to correct the conflict once with no issues, Thanks.

  • @TheWeezyOfOz
    @TheWeezyOfOz 6 ปีที่แล้ว +28

    Excuse my obvious britishness here but:
    MATE! YOU ARE A FUCKING LEGEND!!
    I needed this today sooo baldly!

    • @davedavem
      @davedavem 14 วันที่ผ่านมา

      Old comment, but made my day today 🤣

  • @diyanabag8950
    @diyanabag8950 2 ปีที่แล้ว +1

    Omg, Your way of teaching is so positive, fun, clear, and unique!!! I love it!!!! Thank you so much.

  • @grizzlycougar
    @grizzlycougar 6 ปีที่แล้ว +7

    Thank you. Been to lazy to figure out merge conflicts, so seeing this video really helped, especially since I am working on some pretty big projects at the moment.

  • @guidugaich
    @guidugaich 3 ปีที่แล้ว

    This is the kind of stuff that makes the internet worth. THANK YOU!

  • @beaborg6461
    @beaborg6461 3 ปีที่แล้ว +29

    My heart stops everytime I merge something, worried I've messed up the whole project lol

    • @ashoksingh6362
      @ashoksingh6362 3 ปีที่แล้ว +1

      Same situation

    • @J-Ind24
      @J-Ind24 3 ปีที่แล้ว

      How's it now?

  • @JoeandAlex
    @JoeandAlex 3 ปีที่แล้ว

    Best ever video I watched on TH-cam which covers Git

  • @armandopenaleonett1258
    @armandopenaleonett1258 4 ปีที่แล้ว +3

    Thank you, man, as always you make it look more interesting than an action movie

  • @TheThunder48
    @TheThunder48 3 ปีที่แล้ว

    At the start of video (first time seeing this gentleman) I though he will be too over the top, affected and annoying with his gesticulation and articulation, but honestly It it is great presentation style and it kept me engaged! Many should learn, as I zone-out with most of presenters nowadays. Good luck.

  • @sheenasetia03
    @sheenasetia03 4 ปีที่แล้ว +6

    I really appreciate your teaching skills. Full package of knowledge, creativity, honesty and fun. Also, liked that ting ting ting thing at the last :D

  • @timaya6
    @timaya6 10 หลายเดือนก่อน

    I totally panicked and then I came across this tutorial. Thank you so much for your wonderful tutorials

  • @manavupadhyay8690
    @manavupadhyay8690 3 ปีที่แล้ว +10

    I loved this tutorial series and the way you explain the things! You make everything seem so fun.
    Also, could you please add a video on resolving the merge conflicts using the command line?

  • @lestersyspex9928
    @lestersyspex9928 3 ปีที่แล้ว

    You're my favourite youtuber teacher now! haha

  • @UnderTheTutelage
    @UnderTheTutelage 5 ปีที่แล้ว +1

    Your mannerisms are always lovely to watch :) Thanks for the informative video!

  • @sherrera101
    @sherrera101 3 ปีที่แล้ว +1

    "when I see a green button it just makes me want to click it...click!"
    absolute gold and hilarious

  • @kongr889
    @kongr889 2 ปีที่แล้ว

    I so appreciate these training video. U are a great trainer! These clips are going to help lots of people. ... me included.
    In particular, although I already know github, I don't need to do much conflict resolution! When I need it in a blue-moon night, I often find myself forgetting the detail steps. And this video is very very helpful to get my operational confidence back!
    Thanks thanks thanks!

  • @RealSwankyToad
    @RealSwankyToad 6 ปีที่แล้ว +4

    Thank you so much! I was super overwhelmed when I was trying to figure out how to fix merge conflicts. You saved the day!

  • @Yann21375
    @Yann21375 6 ปีที่แล้ว +2

    Most timely video I have encountered in a long time. Thanks a lot :D

  • @МихаилСемерухин
    @МихаилСемерухин 2 ปีที่แล้ว +1

    Thanks!!! You have saved my evening)))!!

  • @raghib2900
    @raghib2900 2 ปีที่แล้ว

    Loved the vibe of the video. Thanks for making it so clear and fun.

  • @CuriousWithOscar
    @CuriousWithOscar 5 ปีที่แล้ว +1

    This was super helpful! Thank you very much! I managed to get my conflict solved in just 5 minutes.

  • @armageddon9305
    @armageddon9305 ปีที่แล้ว

    Love the way you explain

  • @damarh
    @damarh 3 ปีที่แล้ว

    oh my GOD dude you are a lifesaver. whenever i had a conflict i would always download my code and resolve that shit somewhere else.
    I did not know i could edit the code on the website itself >_>
    PS: Also i somehow forgot this channel existed :D, last time i was here i needed to know something about regexp

  • @MrThepratik
    @MrThepratik 3 ปีที่แล้ว

    +1 for the humorous walkthrough

  • @sudiptakumardas819
    @sudiptakumardas819 2 ปีที่แล้ว

    Super demonstration... I became a fan of yours 😊😊😊

  • @skl949
    @skl949 2 ปีที่แล้ว

    this was great. beautifully executed

  • @vijayalakshmiv3567
    @vijayalakshmiv3567 2 ปีที่แล้ว

    Absolutely loved it😍😍

  • @seongmoon6483
    @seongmoon6483 6 ปีที่แล้ว +4

    YES!! More git videos please

  • @morigene
    @morigene 5 ปีที่แล้ว +2

    Great to learn with you. It's fun. Courage.

  • @Lee14G
    @Lee14G 4 ปีที่แล้ว +28

    I died laughing at 4:01. What a great teacher wow!

  • @KaranSharma-lm6eh
    @KaranSharma-lm6eh 2 ปีที่แล้ว

    That was way too helping and interesting, kudos to you for making it so fun to learn this !!

  • @inanz3561
    @inanz3561 4 ปีที่แล้ว +1

    Great job. Thank you!

  • @KaisarAnvar
    @KaisarAnvar 4 ปีที่แล้ว

    You made my day!!!! Awesome video sir.

  • @Neodude991
    @Neodude991 5 ปีที่แล้ว +1

    Thank you so much! Seems simple but was taking me ages trying to figure this out and needed someone to explain clearly!

  • @nikitashebin1990
    @nikitashebin1990 4 ปีที่แล้ว +1

    Dude, this is one of the best explanations!!!))

  • @backup_hdd
    @backup_hdd 6 ปีที่แล้ว +4

    I'd love to see how this is done in the command line. Great video! :)

    • @io3213
      @io3213 6 ปีที่แล้ว +6

      git checkout master
      git merge other-branch # merges 'other-branch' into 'master'
      git status # to see unmerged files
      # remove conflicts in files
      git add paths/to/modified/files
      git commit

  • @saiprakash6992
    @saiprakash6992 4 ปีที่แล้ว

    You are a great teacher👌

  • @anees1343
    @anees1343 4 ปีที่แล้ว +1

    I appreciate you learning lots from you, your style of teaching is awesome. Thanks

  • @yuktykhandelia5312
    @yuktykhandelia5312 3 ปีที่แล้ว

    Great lesson. Wish I had your energy.

  • @yashtailor1543
    @yashtailor1543 4 ปีที่แล้ว

    You know right, you are one of the best!?

  • @excalibur2123
    @excalibur2123 3 ปีที่แล้ว

    6:55-7:25 "Well, just a second there, professor... We fixed the glitch. So he won't be receiving a paycheck anymore. So it will just work itself out naturally..." / "Problem is solved from your end!" -The Bobs

  • @joweltisso7365
    @joweltisso7365 2 ปีที่แล้ว

    Wow such a fun way to learn about conflicts 😄

  • @luisb9523
    @luisb9523 5 ปีที่แล้ว +1

    Awesome video, educational and entertaining! 👍

  • @aja749
    @aja749 3 ปีที่แล้ว

    I admire how happy he is, I just want to end my life when I see a conflict.

  • @pamelaruley2341
    @pamelaruley2341 4 ปีที่แล้ว

    I found this to be informative. It is not something I am very familiar with. However I recently started coding classes.

  • @GoBeyondCode
    @GoBeyondCode 4 ปีที่แล้ว

    where were you all this time >>> tutorial amazing stuff here

  • @AryanKadiya
    @AryanKadiya 5 ปีที่แล้ว +1

    your videos are really helpful and easy to understand.
    thanks!

  • @kiraninam
    @kiraninam 4 ปีที่แล้ว

    awesome teacher. makes things look easy, enjoyable and conceptual. good job

  • @vedanshbhardwaj6548
    @vedanshbhardwaj6548 3 ปีที่แล้ว

    You are insane, you are the best. The G.O.A.T. !

  • @Victor-mv6vd
    @Victor-mv6vd 2 ปีที่แล้ว

    great explanation with example, thanks ;)

  • @dlimon_
    @dlimon_ 2 วันที่ผ่านมา

    Very nice video. Nice explanation. This is gold. I suscribe!!

  • @thenukadinuj3315
    @thenukadinuj3315 4 ปีที่แล้ว

    Solid Explanation

  • @hamzamx6998
    @hamzamx6998 2 หลายเดือนก่อน

    Thank you so much, you're the best ❤❤❤❤

  • @markieonoon
    @markieonoon 5 ปีที่แล้ว +8

    So how does it know when files are conflicted? what i mean is this: if let's say someone changes line 5 in a file and pushes it. Then someone elkse pushes a change in line 5 too about 5 minutes later.. Why does it not just overwrite it like it would have in a normal situation? does github keep track of what file versions are where at any given time? Like:
    Person A pulls file X from master.
    Person B pulls file X from master aswell.
    then person A changes line 5 and pushes it (nothing happens and everything is fine)
    Github sees that there is an update to file X so it changes the files version.
    then person B pushes his changes on line 5 and there is a conflict because this person still has the older version of file X. This woudnt have been a problem if he changed other lines than line 5(which weren't changed in all the file X versions since his last pull).
    Than someone must decide what change to go with and mark as resolved.
    So to summerize:
    Github keeps track of versions in the background, everytime someone makes a commit the version number changes (calling it version number for simplicity sake)
    if you are working on a older file version than in the master you can only upload changes to lines were no change has been made in updates between your version number and the most recent one on the master.
    If you do it gets conflicted and needs to be resolved.
    i am trying to understand and im just explaining how i see it now,. Please correct me if im wrong.
    Thank you :)

  • @muralisunnam
    @muralisunnam ปีที่แล้ว

    Thank you for awesome content on git.

  • @flatpaper6
    @flatpaper6 3 ปีที่แล้ว +1

    From 5:18 to 5:28, I don't understand how the contributors could fix a merge conflict. Can someone explain it to me?

  • @samk_jg
    @samk_jg ปีที่แล้ว

    awesome tutorial!

  • @SoftwareTestSolutions
    @SoftwareTestSolutions 3 ปีที่แล้ว

    Loved it!

  • @lanhoang1892
    @lanhoang1892 4 ปีที่แล้ว

    thanks so much , it worked for me

  • @vikasns4603
    @vikasns4603 6 ปีที่แล้ว +1

    It kind of feels like magic when you move from whiteboard to computer. Maybe you should make a video on your studio setup.

  • @anjneesharma2984
    @anjneesharma2984 4 ปีที่แล้ว

    i love your style

  • @munnaprasad6356
    @munnaprasad6356 3 ปีที่แล้ว

    Thank you so much 😊😊 it worked

  • @balduran
    @balduran 4 ปีที่แล้ว

    Thank you sir! Exactly was I was looking for.

  • @abdallahabdul860
    @abdallahabdul860 3 ปีที่แล้ว

    Its super cool I have learn alot

  • @LogicOpsLab
    @LogicOpsLab 3 ปีที่แล้ว

    Awesome Stuff!

  • @apolomachine
    @apolomachine 4 ปีที่แล้ว

    this guy it's funny, why i never see this guy before?

  • @Csravankumarraju
    @Csravankumarraju ปีที่แล้ว

    I really thank you, it help me alot

  • @davidgrig4608
    @davidgrig4608 3 ปีที่แล้ว

    you are awesome bro thanks for great explanation

  • @tarvinder91
    @tarvinder91 5 ปีที่แล้ว

    Nice video. V helpful for beginners like me. I did all using command line after watching this GUI mode :)

  • @betiedu
    @betiedu 6 ปีที่แล้ว +1

    Yeey another great vid keep it up man!

  • @animeshkumar1201
    @animeshkumar1201 4 ปีที่แล้ว

    great video sir.

  • @morohicham2579
    @morohicham2579 4 ปีที่แล้ว

    Thank you 🤗🤗🤗👨‍💻

  • @Dieselyura-u2p
    @Dieselyura-u2p 5 ปีที่แล้ว +1

    Is there better explain about github on internet? I don't think so=) keep making your video, it's insane)))

  • @upparimadhu8548
    @upparimadhu8548 5 ปีที่แล้ว +1

    Just awesome explination....

  • @phanxuanbao680
    @phanxuanbao680 2 ปีที่แล้ว

    Thanks, it's useful

  • @monicaluo8983
    @monicaluo8983 3 ปีที่แล้ว

    Thank you very much for the video. I have a question on 7:31 after you clicked commit merge button. Did it affect your master? for this commit, is it just commiting and pushing a fix onto your own branch - map-improvement ? I can't test it on my own, I'm afraid I would ruin my company's work here.

  • @SagarSingh-ie8tx
    @SagarSingh-ie8tx ปีที่แล้ว

    Amazing video :)

  • @pranjalnama2420
    @pranjalnama2420 ปีที่แล้ว

    Thank you

  • @shahzadmunir1379
    @shahzadmunir1379 9 หลายเดือนก่อน

    Thanks its help for me

  • @kashyapthippareddy5122
    @kashyapthippareddy5122 2 ปีที่แล้ว

    Thank you!!

  • @lokeshkumarnatarajan9488
    @lokeshkumarnatarajan9488 4 ปีที่แล้ว

    useful, thank you.

  • @brod515
    @brod515 6 ปีที่แล้ว +2

    So do conflicts only occur when you merge more than 1 file to your master. if you always merge one file at a time will it just continuously overwrite the previous lines with the new lines.

    • @GLRaema
      @GLRaema 6 ปีที่แล้ว +1

      It depends on when both people "received" their files. If two people edit a file at the same time and both publish their changes there can be merge conflicts. But if they work on the file one after another, meaning one person changes something and publishes that change, the other person then takes that changed file and edits that there shouldn't be any merge conflicts.
      Any time you check out the data from a git repository your files get a version number (somewhere hidden in the depths of git). And this version number determines how files are merged. If the file you're editing is at version v1000 and you commit your changes, your file will be compared with the most recent file in the repository. If the most recent file is still v1000 then that means you have the newest version and your changes are accepted without problems. This now changes the version in the repository to v1001.
      But if two people check out the same file at the same time they both get a file with version v1000. The first person to commit a change now gets a free pass and increases the version in the repository to v1001. The second person to commit now has a file with version v1000 that is in theory OLDER than the file in the repository which now has version v1001. This is where merge conflicts can happen. If the second person edited the file in regions where the no change happened (from v1000 to v1001) then the change is usually accepted. But if the second person changed some lines that were also changed going from v1000 to v1001 then you get a merge conflict and need to decide which change you want to use.

  • @BGTenders
    @BGTenders ปีที่แล้ว

    Thank you! lol Instead nuking branches I can actually do it the right way lol

  • @magnus_3316
    @magnus_3316 3 ปีที่แล้ว

    Thanks you I was afraid to click the green button, thinking it would merge my branch into master

  • @MrDavisv
    @MrDavisv 4 ปีที่แล้ว

    Wow this was such a great explanation thank you! What do you do when the merge does not say resolve conflicts and the PR does not actually merge changes?

  • @suthanamalathas8047
    @suthanamalathas8047 4 ปีที่แล้ว

    Thank you so much. 😍🥰🥰😘

  • @footbon_channel1602
    @footbon_channel1602 4 ปีที่แล้ว

    thanks very much !!!

  • @martinnacimiento
    @martinnacimiento 3 ปีที่แล้ว

    Thanks!

  • @richardzimmermann1539
    @richardzimmermann1539 2 ปีที่แล้ว

    Tolles Video! Kuss!!!

  • @azdinator
    @azdinator 2 ปีที่แล้ว

    I love that.

  • @metaorior
    @metaorior 6 ปีที่แล้ว +2

    Thanks!
    Could you make an "introduction" in node JS or Electron?
    Love your stuff

    • @TheCodingTrain
      @TheCodingTrain  6 ปีที่แล้ว +2

      Check out this for node: shiffman.net/a2z/server-node/

    • @metaorior
      @metaorior 6 ปีที่แล้ว

      thanks ♥

  • @anthonytpark
    @anthonytpark 3 ปีที่แล้ว

    Thanks

  • @khaled10taymour
    @khaled10taymour 5 ปีที่แล้ว

    Thanks for your videos
    Could you please make a video for stash

  • @kristjanlink007
    @kristjanlink007 4 ปีที่แล้ว

    Is there a case where the automatic commit message won't have "into " at the end? In an online course the automatic message is just "Merge branch ''". But when I followed along I got "Merge branch '' into " just like in your video on GitHub. Could this be from them having an older version? I'm just using Git 2.28.0.windows.1 through MINGW64 (command line). The course could be using an older version of Git, around 2.20 and on Ubuntu. I already noted some differences, e.g. "git checkout " works the same way as "git restore ", same for "git reset " vs "git restore --staged ".
    (If you have any experience with using Git from the command line)

  • @ro_561
    @ro_561 5 ปีที่แล้ว

    THANK YOU SO MUCH

  • @kamilbolka
    @kamilbolka 6 ปีที่แล้ว +1

    That what I need!

  • @lnxpy
    @lnxpy 4 ปีที่แล้ว

    That was amazing. SUBSCRIBED :D
    I have a question. I have a repo on my account and my friend just forked the repo and made some changes. He actually made some great changes. Removed some files and created some new files and so on. He made a pull request to my repo and what I see in the pull request description is that almost all files are in conflict and the "Resolve Conflicts" button is disabled. It also tells me "Use the command line to resolve conflict before continuing". Any idea?