The EXTREMELY helpful guide to merge conflicts

  Рет қаралды 140,289

Visual Studio Code

Visual Studio Code

Күн бұрын

Пікірлер: 130
@markvogt70
@markvogt70 Жыл бұрын
You EARNED A NEW SUBSCRIBER from this immensely-useful (and timely!) video ! Well done you! -Mark in North Aurora IL
@peabnuts123
@peabnuts123 Жыл бұрын
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 Жыл бұрын
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!
@TheLautapercuspain
@TheLautapercuspain Ай бұрын
​@@code, we are all learning together :-)
@hemanthkumartirupati
@hemanthkumartirupati 2 жыл бұрын
Thank you Vscode team. These videos are extremely helpful. Keep making technical/educational videos
@code
@code 2 жыл бұрын
Thanks for the feedback! Glad it was helpful as it was not at all easy to make. But worth it!
@mmikhan
@mmikhan 2 жыл бұрын
Oh boy! Give this man a raise 👌
@Nevergnnanoe
@Nevergnnanoe 2 ай бұрын
All my years of confusion resolved in one video. Thank you so much!
@rustee_nyfe
@rustee_nyfe 3 ай бұрын
Thank you for that fancy editing. It is waaaay easier to understand than that typical video, where author shakes his microscopic (compared to screen size) cursor and says "click here"
@SJMilnor
@SJMilnor Жыл бұрын
Thanks! Those notecards with shapes on them representing commits were a great illustration.
@martin9755
@martin9755 Жыл бұрын
The title of this video is actually justified. It IS extremely helpful.👍
@bsewall
@bsewall Жыл бұрын
Makes it so much simpler! Thanks for the tip!
@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. 👍
@planetoftheweb
@planetoftheweb 2 жыл бұрын
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 2 жыл бұрын
Hi Ray! 👋
@PeterNeave
@PeterNeave 2 жыл бұрын
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 2 жыл бұрын
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 Жыл бұрын
I wasn’t aware of blondes vs brunettes conflict. What’s in the base branch?
@WaldirPimenta
@WaldirPimenta Жыл бұрын
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!
@jscobie4
@jscobie4 6 ай бұрын
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.
@tharinda
@tharinda Жыл бұрын
The one that pulled the triggers for me. Well explained! 🙏
@DevLeonardo
@DevLeonardo 2 жыл бұрын
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 2 жыл бұрын
@@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 5 ай бұрын
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 5 ай бұрын
what a kind thing to say! thank you so much for the note.
@YiuMingLai
@YiuMingLai 2 жыл бұрын
yes, very useful feature I have been rebasing my code change every day waiting for code review.
@psr-pk7db
@psr-pk7db Жыл бұрын
Thanks a lot.. now my issue is resolved and understood the merge-conflict concept well.
@code
@code Жыл бұрын
Wonderful!
@the_real_foamidable
@the_real_foamidable 2 жыл бұрын
This was EXTREMELY helpful as advertised!
@attilapinter7141
@attilapinter7141 Жыл бұрын
Yep, exactly the type of parties we have at the openSUSE Bar so thanks for the ammo ^-^
@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!
@bslayerw
@bslayerw 2 жыл бұрын
I also like these short bit sized videos that I don't have to set 30 minutes or more aside for.
@sanjayplays5010
@sanjayplays5010 Жыл бұрын
Now that's a title that actually fit the content ;) Cheers for the explanation
@innigaadu
@innigaadu Жыл бұрын
Great Explanation !! I could not have asked for anything better
@allgon6248
@allgon6248 Жыл бұрын
I gave a like to this video because the visual demonstration in the beginning. 👍
@edh9500
@edh9500 Жыл бұрын
This video is a superb headache saver. Thank you!
@ddtddt55
@ddtddt55 10 ай бұрын
This is a best video that explain how to resolve merge conflict. 👍
@BruceElgort
@BruceElgort Жыл бұрын
This was an excellent demonstration! Thank you for it.
@safirmohammadshaikh6052
@safirmohammadshaikh6052 7 ай бұрын
Thanks, a sigh of relief after watching this!!!
@shooding
@shooding Жыл бұрын
saved me a lot of time opening the resource-consuming source tree (If and only if the project is developed under VSCode)
@MuhammadAlam-ne9cf
@MuhammadAlam-ne9cf 2 жыл бұрын
wow the video title wasn't lying!!
@Carsono5
@Carsono5 Жыл бұрын
Oh, how I struggle with this. But now I understand a bit more about the dark art of merging conflicts.
@bslayerw
@bslayerw 2 жыл бұрын
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.
@kumarraja1989
@kumarraja1989 2 жыл бұрын
Thank you, really helpful to understand new merge editor in vscode
@thkpolitico
@thkpolitico 2 ай бұрын
Note that when you rebase, Current is the changes from Origin, while incoming are the changes in my local branch. Go figure...
@tranquiloteov
@tranquiloteov Жыл бұрын
Awsome video. Thank you from Spain
@BartvandenDonk
@BartvandenDonk 2 жыл бұрын
Thanks for the complete explanation.
@serhioromano
@serhioromano 2 жыл бұрын
Now it really make sense.
@Norfeldt
@Norfeldt 2 жыл бұрын
How did you know I like to talk about this at parties😮 are you tracking me?! ❤ The content ❤
@dodi981
@dodi981 2 жыл бұрын
Well explained . Thanks. Great job.
@michaelm8044
@michaelm8044 2 жыл бұрын
Very helpful, thanks VSCode!
@code
@code 2 жыл бұрын
You are welcome, Michael M
@futuza
@futuza Жыл бұрын
Any strategies/suggestion for when you have thousands of merge conflicts to compare and only understand some of the commits?
@AndrzejPauli
@AndrzejPauli 2 жыл бұрын
Toootally I will brag about this video. In fact I'm gonna share it with my team :-)
@TheLautapercuspain
@TheLautapercuspain Ай бұрын
Very nice video, thanks for making it :)
@yassineelaissaoui2541
@yassineelaissaoui2541 Жыл бұрын
Thanks, this is well explained 🙏
@danielschwartz516
@danielschwartz516 2 жыл бұрын
was looking for that base, Tnx.
@fokeyjo
@fokeyjo 9 ай бұрын
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!
@CsabaKissColorado
@CsabaKissColorado 2 жыл бұрын
Fantastic explanation. Thank you!
@jonathanclark1178
@jonathanclark1178 Жыл бұрын
I learned lots -- great video.
@osamasalama6133
@osamasalama6133 11 ай бұрын
why vscode not show conflict window ?? any help
@ThomasGulsever
@ThomasGulsever Жыл бұрын
thank you , great video well explained
@arindam-karmakar
@arindam-karmakar Жыл бұрын
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.
@JuiceRabbit
@JuiceRabbit 2 жыл бұрын
Excellent! 👍
@amalkrishnas1696
@amalkrishnas1696 6 ай бұрын
thank you , very helpful
@MarkvanBuskirk
@MarkvanBuskirk 2 жыл бұрын
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.
@alashi520
@alashi520 6 ай бұрын
05:41 的意思是說 當我們已經調整完(accept changes),但我們反悔,不想accept this change,我們就"remove current"
@papunmohanty5968
@papunmohanty5968 2 жыл бұрын
cool, if base goes in the middle, I am buying new 32 inch monitor awesome feature 😎
@twigan
@twigan Жыл бұрын
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?
@johnston777
@johnston777 8 ай бұрын
what is extension to support this? my interface is quite different with yours. there are no option like "accept incoming change" etc.
@kishoreandra
@kishoreandra 2 жыл бұрын
Thanks Burke 🙏
@ioanabiris3472
@ioanabiris3472 Жыл бұрын
Thank you very much!!!
@smorebytes
@smorebytes 2 жыл бұрын
Amazing. 10/10
@gastontrotteyn4726
@gastontrotteyn4726 Ай бұрын
The video is really great. It helped me resolve conflicts in a super clear way. But I have a problem with the VSC interface to handle git. It's a pretty specific problem, but I think it may be a more or less common case. Suppose I have a branch with a change that generates conflicts with main, and I resolve the conflict by selecting the changes in the branch. In this case, there are no changes to include in stage and commit. I know this commit is also necessary, but in this scenario VSC has disabled the commit button since there are no changes. I can solve it with the console, typing git add . and git commit -m "merge message", but is there a way to do it from the VSC visual interface?
@Mysteria9
@Mysteria9 Жыл бұрын
Superb video!
@navid.jfrzadeh6074
@navid.jfrzadeh6074 2 ай бұрын
very helpful thanks
@xyz-om5cw
@xyz-om5cw 9 ай бұрын
This tutorial is a kind of imcomplete. We can get to the point where we resolve conflics by clicking "accept current/incoming changes" or taking in both, but the issue is the next step to complete rebasing as well as the merge of the feature branch into the main. On the left bottom, the bar showing the branch name says "~(rebasing)." How do we resolve this?
@baobingli2263
@baobingli2263 18 күн бұрын
yes. how to resovle the rebase action?
@mitz8892
@mitz8892 11 ай бұрын
nice explanation, but why your iris is showing square ? 😉
@1off271
@1off271 Жыл бұрын
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`
@malipetek
@malipetek 2 жыл бұрын
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.
@savimcgee7443
@savimcgee7443 Жыл бұрын
Thank you!
@zapy422
@zapy422 8 ай бұрын
shouldn't base be enabled by default?
@HDdeiu
@HDdeiu 2 жыл бұрын
thanks this was very helpful
@MohamIsMe
@MohamIsMe Ай бұрын
I thought I had git figured out until I had to work on the same code with other people. The confusion was indescribable
@narutokunn
@narutokunn 2 жыл бұрын
Thanks for this
@patrickjustice7371
@patrickjustice7371 2 жыл бұрын
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.
@kevinconde5528
@kevinconde5528 10 ай бұрын
Fantastic!
@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?
@ThomasBurleson
@ThomasBurleson 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
Any video/article on this to refer ?
@Kayotesden
@Kayotesden 2 жыл бұрын
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 2 жыл бұрын
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.
@charlesabju907
@charlesabju907 3 ай бұрын
What a great video
@easyhandmadecraft2337
@easyhandmadecraft2337 6 ай бұрын
Super
@averma12
@averma12 9 ай бұрын
This seems like vscode accepting Jetbrains merge editor as the way to resolve merge conflicts
@avanreijn
@avanreijn 2 жыл бұрын
All your base are belong to us!
@saber8387
@saber8387 4 ай бұрын
Bruh this simple "Abort merge" made me rage quit coding for a week
@kajautus
@kajautus Жыл бұрын
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.
@ckat609
@ckat609 2 жыл бұрын
It's all about the base
@akshimmu
@akshimmu 2 жыл бұрын
Git mergetool --tool=(beyond compare/meld/ any comparison tool)
@codycodes
@codycodes 2 жыл бұрын
This whole time VS Code was abstracting the base commit away from us 😂
@code
@code 2 жыл бұрын
🫣
@riku5543
@riku5543 2 жыл бұрын
Based
@rprLKA
@rprLKA 2 жыл бұрын
Of course, I'm going to brag about this at parties.
@coolmind2476
@coolmind2476 11 ай бұрын
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.
@Jaybearno
@Jaybearno 5 ай бұрын
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.
@primemate5673
@primemate5673 2 жыл бұрын
code ai guide please
@honefone
@honefone Жыл бұрын
thank god for abort merge
@MagicBoterham
@MagicBoterham Жыл бұрын
If you like this comment like this comment, like this comment.
@marufhassan634
@marufhassan634 2 жыл бұрын
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 2 жыл бұрын
the better option may be to just open all 4 “files” in separate windows
@code
@code 2 жыл бұрын
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 2 жыл бұрын
Sorry. You lost me on the concept. Thank you for trying though.
@labombarde1
@labombarde1 11 ай бұрын
Git .. the Muddiest Splash Page ever made. It really doesn't need to be this cryptic and difficult to use a memory card. smh
@andgatehub
@andgatehub Жыл бұрын
I really hate the new editor. Just let me edit text. I don't want to mess around with a slow, clunky interface.
@ChrisBohling
@ChrisBohling 2 жыл бұрын
If you are saying that VS Code just now discovered the concept of base, that’s not really a positive.
@kapilkumar-vi1nt
@kapilkumar-vi1nt 2 жыл бұрын
Hey bro what do you help me from AdSense loading or AdSense loading methods
Git MERGE vs REBASE
16:12
Academind
Рет қаралды 1 МЛН
25 VS Code Productivity Tips and Speed Hacks
11:35
Fireship
Рет қаралды 2,4 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Git merge and git conflicts
39:37
Hitesh Choudhary
Рет қаралды 26 М.
Learn Python AND Data Science in just an hour
1:12:33
Visual Studio Code
Рет қаралды 29 М.
Git Tutorial For Dummies
19:25
Nick White
Рет қаралды 1,3 МЛН
VSCode Merge Conflicts: Understanding and Resolving Code Differences
6:51
Monsterlessons Academy
Рет қаралды 3 М.
12 VS Code Extensions to INCREASE Productivity 2024
27:13
Devression
Рет қаралды 861 М.
Resolve Git MERGE CONFLICTS: The Definitive Guide
8:02
The Modern Coder
Рет қаралды 54 М.
How to be a git expert
46:26
Floating Little Leaves of Code
Рет қаралды 177 М.
You are Fixing your Merge Conflicts The Wrong Way in VSCode
8:11
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.