The EXTREMELY helpful guide to merge conflicts

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024

Комментарии • 119

  • @peabnuts123
    @peabnuts123 Год назад +15

    I spent years thinking "isn't there some information I'm missing here??" before I discovered git's `diff3` conflict style. It's insane to me that git just shows you the result of each change (not what it was beforehand) by default. I don't know how anybody is merging anything like that. Vscode's merge tool makes this even easier 👍 I've been very excited seeing it roll into the product, knowing "proper" merge conflict resolution will be available to so many people now! I just wish the base view was enabled by default.

    • @code
      @code  Год назад +2

      I didn't know about the "base" either until I made that video. And I've been using git for at least 10 years. Glad you like it!

  • @PeterNeave
    @PeterNeave Год назад +66

    I'm always amazed what VS Code can do. Can it resolve other types of conflicts? tabs vs spaces, blonds vs brunettes, Ukraine vs Russia, etc?

    • @bslayerw
      @bslayerw Год назад +5

      it has a problem with tabs vs spaces (jk), it should resolve the other conflicts fine, but will need a couple of plugins haha

    • @RaineWilder
      @RaineWilder Год назад +8

      I wasn’t aware of blondes vs brunettes conflict. What’s in the base branch?

  • @hemanthkumartirupati
    @hemanthkumartirupati Год назад +26

    Thank you Vscode team. These videos are extremely helpful. Keep making technical/educational videos

    • @code
      @code  Год назад +7

      Thanks for the feedback! Glad it was helpful as it was not at all easy to make. But worth it!

  • @markvogt70
    @markvogt70 Год назад +7

    You EARNED A NEW SUBSCRIBER from this immensely-useful (and timely!) video !
    Well done you!
    -Mark in North Aurora IL

  • @jscobie4
    @jscobie4 Месяц назад +1

    Just learning how to turn on the base window was worth its weigh in gold. I can't believe I've missed that all this time.

  • @phatdad66
    @phatdad66 Год назад +1

    I can't tell you how many years I have tried or wanted to learn how to program just even the simplest of code but between just the terminology and gooeys of everything altogether it was such a whirlwind I could never wrap my head around it and by anytime I started making some progress whatever free trials cider video I was watching hit a massive pay wall and it was generally after hours of hard work and at that point you barely learned anything and you want to punch yourself in the mouth. What he just taught me in the last two lessons or only two lessons of this beginner tutorial for visual studio code and GitHub is it literally she'll shocking me right now in a great way and also quite a face-palming way as well as I think back of all the years of things are now making sense to me and what went wrong all those times I don't even know who to thank or how many times I could thank them for creating this video and putting it in whatever search terminology seoi happen to type today but just know I do and I'm pretty sure that feeling will grow exponentially

  • @DevLeonardo
    @DevLeonardo Год назад +21

    I released a video about how to handle a conflict on vscode like... last week! But I didn't know we had the base branch view. Thanks for sharing!
    Good thing that I already have a wide monitor to fit all those panels 😅

    • @code
      @code  Год назад +2

      What's your video link? We'd be happy to RT or help promote. The more content the better!

    • @DevLeonardo
      @DevLeonardo Год назад

      @@code Hey! That would be amazing! ❤
      Acutally, I think I already replied to this comment but I suppose comments with links are automatically hidden/deleted, so... let's find another way without the link 😅
      If the last comment was deleted, you can find the video on my channel, it's called: Resolve Merge Conflict in Visual Studio Code (2022 Update!)
      Aaaand if you have 5 more minutes, a month ago I also released a video where I introduce how to contribute to the vscode repo on github, with title: How to Contribute to Visual Studio Code - 8 PRs Accepted
      Thank you!!

  • @valp_co
    @valp_co 12 дней назад

    I love this kinda of content, being able to smootly go over git, allow me to go faster and confident.
    thanks for this content, great job.

    • @code
      @code  8 дней назад

      what a kind thing to say! thank you so much for the note.

  • @RichardNobel
    @RichardNobel Год назад +2

    queue 🎵 Meghan Trainor - All About That -Bass- *BASE* 😉 ( 4:18 in the video )
    On topic: VS Code keeps getting better! Thanks for pointing out the "Show Base" and "Accept Combination" features. 👍

  • @mmikhan
    @mmikhan Год назад +4

    Oh boy! Give this man a raise 👌

  • @WaldirPimenta
    @WaldirPimenta Год назад +5

    I'm pretty comfortable with using git on the terminal, but the new "Accept Combination" feature has been very helpful so far! It does feel a bit magical and I keep double-checking its results to make sure it didn't mess up, but I guess git's own automatic conflict resolution is already a piece of "magic" that I accept, so it's only fair that this is merely an extension of that. I hope this work can be upstreamed back to git!

  • @planetoftheweb
    @planetoftheweb Год назад +4

    Well done video bud. Love the stickies! The new Merge tool is one of the best additions to VS code in a long time.

    • @code
      @code  Год назад +1

      Hi Ray! 👋

  • @bsewall
    @bsewall Год назад +2

    Makes it so much simpler! Thanks for the tip!

  • @psr-pk7db
    @psr-pk7db Год назад +1

    Thanks a lot.. now my issue is resolved and understood the merge-conflict concept well.

    • @code
      @code  Год назад

      Wonderful!

  • @attilapinter7141
    @attilapinter7141 Год назад +1

    Yep, exactly the type of parties we have at the openSUSE Bar so thanks for the ammo ^-^

  • @bslayerw
    @bslayerw Год назад +1

    I also like these short bit sized videos that I don't have to set 30 minutes or more aside for.

  • @SJMilnor
    @SJMilnor Год назад

    Thanks! Those notecards with shapes on them representing commits were a great illustration.

  • @safirmohammadshaikh6052
    @safirmohammadshaikh6052 2 месяца назад

    Thanks, a sigh of relief after watching this!!!

  • @tharinda
    @tharinda 7 месяцев назад

    The one that pulled the triggers for me. Well explained! 🙏

  • @halopinx3398
    @halopinx3398 Год назад

    From a webstorm ide I need to change to VS Code. This explains very well on how to merge conflicts on VSCode. Thank you!

  • @Carsono5
    @Carsono5 Год назад

    Oh, how I struggle with this. But now I understand a bit more about the dark art of merging conflicts.

  • @fokeyjo
    @fokeyjo 4 месяца назад

    Liked your presentation methods! Great to see VSC does have the base view now, but I still don't think it'll move me away from Beyond Compare!

  • @YiuMingLai
    @YiuMingLai Год назад

    yes, very useful feature I have been rebasing my code change every day waiting for code review.

  • @martin9755
    @martin9755 Год назад

    The title of this video is actually justified. It IS extremely helpful.👍

  • @shooding
    @shooding 11 месяцев назад

    saved me a lot of time opening the resource-consuming source tree (If and only if the project is developed under VSCode)

  • @sanjayplays5010
    @sanjayplays5010 Год назад

    Now that's a title that actually fit the content ;) Cheers for the explanation

  • @edh9500
    @edh9500 Год назад

    This video is a superb headache saver. Thank you!

  • @patrickjustice7371
    @patrickjustice7371 Год назад +4

    Jetbrains IDEA has had similar merge window for about 20 years. Good job, microsoft. I don't understand why microsoft couldn't add side by side merge window to vscode from the begining.

  • @allgon6248
    @allgon6248 Год назад

    I gave a like to this video because the visual demonstration in the beginning. 👍

  • @ThomasBurleson
    @ThomasBurleson Год назад +9

    This is why you should ALWAYS rebase before a PR and before merging. And... squash your feature branch commits to make any conflicts easy to resolve.

    • @austinZen8800
      @austinZen8800 Год назад +1

      this sounds like it may be very helpful but can you please explain how a rebase and squash help with with potential merge conflicts?

    • @abhishekmali2289
      @abhishekmali2289 Год назад +1

      Any video/article on this to refer ?

    • @Kayotesden
      @Kayotesden Год назад

      Squashing feature branch commit is a terrible suggestion.
      More appropriate to reorg the commit (reword, squash etc some for better organisation).
      Commits serve a purpose of identifying what chunk of work was done.
      I would hate to review such massive commits as per suggestion...

    • @ShayanDavoodii
      @ShayanDavoodii Год назад +1

      What's the meaning of rebase?

    • @Massimus888
      @Massimus888 Год назад +2

      @@zaka8315 it sure works even if changes have been pushed to remote. The issue 'can' arise if you are multiple people working on the same feature branch, but this can also be easily solved. Squashing commits on a feature branch can also come in handy. When writing code, things always get messy and changes are added, modified and removed through commits. Rebasing commits on a feature branch by squashing commits can create a cleaner history of the commits for the reviewer of the PR and those looking through the master history.

  • @MarkvanBuskirk
    @MarkvanBuskirk Год назад +1

    Get a conversation going about how you've been working on getting better at "threeways" and you have done them enough that you're much more comfortable with them now.

  • @innigaadu
    @innigaadu Год назад

    Great Explanation !! I could not have asked for anything better

  • @the_real_foamidable
    @the_real_foamidable Год назад

    This was EXTREMELY helpful as advertised!

  • @ddtddt55
    @ddtddt55 5 месяцев назад

    This is a best video that explain how to resolve merge conflict. 👍

  • @BruceElgort
    @BruceElgort Год назад

    This was an excellent demonstration! Thank you for it.

  • @MuhammadAlam-ne9cf
    @MuhammadAlam-ne9cf Год назад

    wow the video title wasn't lying!!

  • @michaelm8044
    @michaelm8044 Год назад +1

    Very helpful, thanks VSCode!

    • @code
      @code  Год назад +1

      You are welcome, Michael M

  • @1off271
    @1off271 Год назад +1

    Use code lens (take current/their) & default vscode editor, it's enough, you don't need 3 window for this.
    To see parent use - `conflictstyle = zdiff3`

  • @Norfeldt
    @Norfeldt Год назад

    How did you know I like to talk about this at parties😮 are you tracking me?!
    ❤ The content ❤

  • @malipetek
    @malipetek Год назад +1

    Only git command I use from terminal is git merge --quit
    For anything else I use git graph extension. It is so essential for me.

  • @BartvandenDonk
    @BartvandenDonk Год назад

    Thanks for the complete explanation.

  • @kumarraja1989
    @kumarraja1989 Год назад

    Thank you, really helpful to understand new merge editor in vscode

  • @dodi981
    @dodi981 Год назад +1

    Well explained . Thanks. Great job.

  • @bslayerw
    @bslayerw Год назад

    Awesome video. This really clear it up for me. I'll be using git in vscode a lot more than my third party git client.

  • @Mysteria9
    @Mysteria9 8 месяцев назад

    Superb video!

  • @alashi520
    @alashi520 Месяц назад

    05:41 的意思是說 當我們已經調整完(accept changes),但我們反悔,不想accept this change,我們就"remove current"

  • @papunmohanty5968
    @papunmohanty5968 Год назад +3

    cool, if base goes in the middle, I am buying new 32 inch monitor
    awesome feature 😎

  • @tranquiloteov
    @tranquiloteov Год назад

    Awsome video. Thank you from Spain

  • @AndrzejPauli
    @AndrzejPauli Год назад

    Toootally I will brag about this video. In fact I'm gonna share it with my team :-)

  • @amalkrishnas1696
    @amalkrishnas1696 Месяц назад

    thank you , very helpful

  • @danielschwartz516
    @danielschwartz516 Год назад

    was looking for that base, Tnx.

  • @serhioromano
    @serhioromano Год назад

    Now it really make sense.

  • @arindam-karmakar
    @arindam-karmakar Год назад +1

    When the new merge editor came out, it seemed very confusing to me. I found it difficult to use because, the diff in vscode does not always corresponds to the exact lines of changes between local and remote, so I turned it off. I might give it another try after watching this video.

  • @jonathanclark1178
    @jonathanclark1178 Год назад

    I learned lots -- great video.

  • @CsabaKissColorado
    @CsabaKissColorado Год назад

    Fantastic explanation. Thank you!

  • @ioanabiris3472
    @ioanabiris3472 8 месяцев назад

    Thank you very much!!!

  • @StephenMoreira
    @StephenMoreira Год назад +1

    Amazing. 10/10

  • @yassineelaissaoui2541
    @yassineelaissaoui2541 Год назад

    Thanks, this is well explained 🙏

  • @ThomasGulsever
    @ThomasGulsever Год назад

    thank you , great video well explained

  • @savimcgee7443
    @savimcgee7443 10 месяцев назад

    Thank you!

  • @twigan
    @twigan 11 месяцев назад

    Thanks, this video does an excellent job explaining this. I never realized you could easily compare right to the base. I've always used git blame to see what each side did manually - what a chore. This will make it so much easier. Is this ability to open all four panels in Visual Studio proper?

  • @kevinconde5528
    @kevinconde5528 5 месяцев назад

    Fantastic!

  • @JuiceRabbit
    @JuiceRabbit Год назад +1

    Excellent! 👍

  • @johnston777
    @johnston777 3 месяца назад

    what is extension to support this? my interface is quite different with yours. there are no option like "accept incoming change" etc.

  • @futuza
    @futuza 10 месяцев назад

    Any strategies/suggestion for when you have thousands of merge conflicts to compare and only understand some of the commits?

  • @AnythingGodamnit
    @AnythingGodamnit 9 месяцев назад

    This looks great but I don't see any "Resolve in Merge Editor" button - I just see the original merge conflict UI with no button.

    • @AnythingGodamnit
      @AnythingGodamnit 9 месяцев назад

      Ah, nevermind. I had opened the file on its own. I had to open the parent repository before the button showed up. I guess that makes sense because some of the info required for 3-way diff would be in the git repo...?

  • @kishoreandra
    @kishoreandra Год назад

    Thanks Burke 🙏

  • @akshimmu
    @akshimmu Год назад +1

    Git mergetool --tool=(beyond compare/meld/ any comparison tool)

  • @YashSharma-qo1sy
    @YashSharma-qo1sy 5 месяцев назад

    Thanks

  • @mitz8892
    @mitz8892 6 месяцев назад

    nice explanation, but why your iris is showing square ? 😉

  • @averma12
    @averma12 4 месяца назад

    This seems like vscode accepting Jetbrains merge editor as the way to resolve merge conflicts

  • @HDdeiu
    @HDdeiu Год назад

    thanks this was very helpful

  • @narutokunn
    @narutokunn Год назад

    Thanks for this

  • @tylerhartman1630
    @tylerhartman1630 Год назад

    Okay... I fell like I'm going crazy here, but here goes...
    In the code he's merging, the log will tell you that the params are all being set to equal each other, but that isn't the case in the 'current' block. By setting param1 = param2 and then changing param2 = param3, you ensure that param2 and param3 are equal, but param1 is holding the value left by param2... Am I going crazy?

  • @kajautus
    @kajautus 7 месяцев назад

    My problem:
    Do stuff -> commit
    Do stuff2 -> commit
    Ohno, need to fix stuff in in commit.
    git rebase -i HEAD~2
    e stuff
    pick stuff2
    Do changes!
    Git commit --amend
    etc.
    CONFLICT!
    Now I have absolutely no idea what is meant with incoming or current. Do I always select the "best" option or what?
    Do I end up with
    stuff + things from stuff2 - commit
    stuff2 commit
    or what..
    Send help.

  • @osamasalama6133
    @osamasalama6133 6 месяцев назад

    why vscode not show conflict window ?? any help

  • @avanreijn
    @avanreijn Год назад +1

    All your base are belong to us!

  • @easyhandmadecraft2337
    @easyhandmadecraft2337 Месяц назад

    Super

  • @ckat609
    @ckat609 Год назад

    It's all about the base

  • @zapy422
    @zapy422 3 месяца назад

    shouldn't base be enabled by default?

  • @rprLKA
    @rprLKA Год назад

    Of course, I'm going to brag about this at parties.

  • @codycodes
    @codycodes Год назад

    This whole time VS Code was abstracting the base commit away from us 😂

    • @code
      @code  Год назад

      🫣

  • @coolmind2476
    @coolmind2476 6 месяцев назад

    Great explanation. But whoever invented git and the Integration in vscode didnt design it properly, its very confusing and error prone. Actually I think it should not be allowed that two peole work simulateously on the same line of code, there should be a kind of locking concept. If someone wants to edit a file it should be locked for other developers to avoid conflicts.

    • @Jonathan-rm6kt
      @Jonathan-rm6kt 7 дней назад

      I think you might be missing the point a bit. There's no way of knowing who is working in the same line until there's a commit. Any implementation of that, exaggerated, would eventually just be a live coding pad. For as much as i despise the confusing nature of Git, it really is an elegant solution to this problem.

  • @honefone
    @honefone Год назад

    thank god for abort merge

  • @riku5543
    @riku5543 Год назад

    Based

  • @ChrisBohling
    @ChrisBohling Год назад

    If you are saying that VS Code just now discovered the concept of base, that’s not really a positive.

  • @primemate5673
    @primemate5673 Год назад

    code ai guide please

  • @labombarde1
    @labombarde1 6 месяцев назад

    Git .. the Muddiest Splash Page ever made. It really doesn't need to be this cryptic and difficult to use a memory card. smh

  • @MagicBoterham
    @MagicBoterham Год назад

    If you like this comment like this comment, like this comment.

  • @andgate6204
    @andgate6204 Год назад

    I really hate the new editor. Just let me edit text. I don't want to mess around with a slow, clunky interface.

  • @marufhassan634
    @marufhassan634 Год назад +1

    Its really bad implementation on the part of VSCode and I absolutely hate this.
    1. The good functionalities are hidden inside the dropdown icon.
    2. In smaller screen such as 13 inch laptop, this isn't helpful as I have to constantly scroll horizontally continuously to check the change.
    3. Smart merge button is hidden.
    Android Studio handles this in the most efficient way by opening a window and decreasing the font size and giving all the options in the top as icons. Press smart merge and it will merge the possible merges which doesn't require your attention. Just press → to accept changes for the lines you want and x to discard them. I hope VSCode also just copies that system or gives an option to display in a seperate window.

    • @chri-k
      @chri-k Год назад

      the better option may be to just open all 4 “files” in separate windows

    • @code
      @code  Год назад +3

      Hi Maruf! Thank you for taking the time to make these suggestions. I've passed this on to the engineer working on the merge editor experience. We can always improve so we appreciate that you took the time to let us know what you'd like to see. Cheers!

  • @ndk8111
    @ndk8111 Год назад

    Sorry. You lost me on the concept. Thank you for trying though.

  • @kapilkumar-vi1nt
    @kapilkumar-vi1nt Год назад +1

    Hey bro what do you help me from AdSense loading or AdSense loading methods

  • @ButchCassidyAndSundanceKid
    @ButchCassidyAndSundanceKid Год назад

    What about Rebase ?

  • @vibhorkashyap
    @vibhorkashyap Год назад +1

    Thanks