Resolve Git MERGE CONFLICTS: The Definitive Guide

  Рет қаралды 29,330

The Modern Coder

The Modern Coder

Күн бұрын

👨‍💻 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

Пікірлер: 51
@DJRanoia
@DJRanoia 2 ай бұрын
Dont forget a `git stash pop` to bring back your changes you stashed
@cpakkala
@cpakkala 11 сағат бұрын
Great series of videos; thanks. There is one very important thing, however, that everyone tends to gloss over regarding conflicts, and this cannot be understated: just because a merge or rebase results in no conflicts does not mean the resulting code is correct! Everyone who actually works in software development needs to be reminded of this constantly. You absolutely need to test your code after doing the merge/rebase (both testing of your new features as well as regression testing). The merging algorithms are not intelligent programmers... Furthermore, because you need to do this testing, it is always wisest to pull in changes from main to your branch and then test before merging or rebasing your branch back into main.
@soadsam
@soadsam 3 ай бұрын
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 ай бұрын
That’s awesome. Thanks for letting me know 😊
@davidpaez_co
@davidpaez_co 20 күн бұрын
This is honestly the best git course in all KZbin. Thank you so much!
@SwedeOfEnbound
@SwedeOfEnbound 4 ай бұрын
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 4 ай бұрын
Really appreciate your nice note, and even more so for sharing video with others who’d find it helpful. Cheers!
@AkimboFennec
@AkimboFennec Ай бұрын
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 KZbin 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 Ай бұрын
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.
@AK-vx4dy
@AK-vx4dy 4 ай бұрын
You bought my by show how to abort merge right away 😳 Great job, nice level of knowledge for many, keep going.
@asishkumarmahapatra6245
@asishkumarmahapatra6245 4 ай бұрын
love to watch your videos always and a big thumbs-up as always
@porchmail
@porchmail Ай бұрын
Truly appreciate! This is one of the best IT tutorial videos that I’ve ever seen!
@farhaannishtar786
@farhaannishtar786 3 ай бұрын
love the quality vid man
@fwostedfwakes733
@fwostedfwakes733 6 ай бұрын
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 ай бұрын
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
@naveedbhuiyan9855
@naveedbhuiyan9855 6 ай бұрын
that was very helpful. Thanks a lot :D
@mxsniper223
@mxsniper223 18 күн бұрын
شكرا جزيلا .. thanks' a lot man
@ic_1234
@ic_1234 Ай бұрын
very nice, sir, thanks!!!
@user-eq4zl8mq7k
@user-eq4zl8mq7k Ай бұрын
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
@SalvadorAguilar
@SalvadorAguilar 27 күн бұрын
Thank you a lot for this brother!
@themoderncoder
@themoderncoder 27 күн бұрын
For sure, glad it was helpful. If you know anyone else who would benefit, please share a link!
@SunsetNova
@SunsetNova 7 ай бұрын
Great thanks
@realsnsar
@realsnsar 7 ай бұрын
what a tutorial !
@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 ай бұрын
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!
@raimerencarnacion1238
@raimerencarnacion1238 2 ай бұрын
Very useful.
@joeybasile1572
@joeybasile1572 5 ай бұрын
Thanks boss
@radouane5376
@radouane5376 2 ай бұрын
thanks
@elzabethtatcher9570
@elzabethtatcher9570 7 ай бұрын
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
@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
@matk2283
@matk2283 3 ай бұрын
outstanding tutorial on merge conflict. much appreciated for posting this. Mathew. K from Colorado
@FallenStarFeatures
@FallenStarFeatures 2 ай бұрын
TL;DW: git status TL;DW: You are in a maze of twisty little passages, all alike.
@theherk
@theherk 3 ай бұрын
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 3 ай бұрын
You’re absolutely right - I’m a little lazy on my commit messages and I can definitely do better there.
@jojje3000-1
@jojje3000-1 29 күн бұрын
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 ай бұрын
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 ай бұрын
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 ай бұрын
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
@rickymartin181
@rickymartin181 4 ай бұрын
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 4 ай бұрын
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 4 ай бұрын
@@themoderncoder thank you so much for the reply. 🙌🏻
@themoderncoder
@themoderncoder 4 ай бұрын
@@rickymartin181 np
@kaibe5241
@kaibe5241 20 күн бұрын
This isn't even close to being definitive... It skips over so many features that git provides for managing conflicts.
Git CHERRY PICK Tutorial
4:42
The Modern Coder
Рет қаралды 92 М.
Git MERGE vs REBASE: The Definitive Guide
9:39
The Modern Coder
Рет қаралды 85 М.
Каха ограбил банк
01:00
К-Media
Рет қаралды 9 МЛН
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 57 МЛН
Haha😂 Power💪 #trending #funny #viral #shorts
00:18
Reaction Station TV
Рет қаралды 13 МЛН
ТАМАЕВ vs ВЕНГАЛБИ. Самая Быстрая BMW M5 vs CLS 63
1:15:39
Асхаб Тамаев
Рет қаралды 4,8 МЛН
The Most Important Skill You Never Learned
34:56
Web Dev Simplified
Рет қаралды 162 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1 МЛН
NEOVIM GIT PRODUCTIVITY: 2024
10:22
Ashish Alex
Рет қаралды 3 М.
Git merge and git conflicts
39:37
Hitesh Choudhary
Рет қаралды 16 М.
Why Does Scrum Make Programmers HATE Coding?
16:14
Thriving Technologist
Рет қаралды 495 М.
What Makes A Great Developer
27:12
ThePrimeTime
Рет қаралды 145 М.
Git PULL vs FETCH
7:13
The Modern Coder
Рет қаралды 7 М.
This Zsh config is perhaps my favorite one yet.
17:24
Dreams of Autonomy
Рет қаралды 145 М.
Каха ограбил банк
01:00
К-Media
Рет қаралды 9 МЛН