Git Branches Demo in Visual Studio 2022: Merge Into Current, Pull Request, Merge to Main, Sync
HTML-код
- Опубликовано: 11 сен 2024
- In this video, I demonstrate how to 1) Create a branch in Visual Studio 2022, 2) Make changes to that branch, 3) Push changes to GitHub, 4) Make changes in another branch (main/master) and then pull those changes into our feature branch, 5) Push changes to GitHub, 6) Create a Pull Request, 7) Merge the Pull Request, 8) Synchronize Visual Studio with our now-updated branches. GitHub is fundamental to programming today, and understanding the benefits of feature branches in a team environment demonstrates mastery of this concept.
Havent understand git until this video. thanks a lot.
Awesome, I'm glad it helped! Git/GitHub are fundamental to being an excellent developer. I hope you're building something great!
Great Job! You are a solid teacher. Learned a lot from this video, keep up the good work!
Thanks so much! This was a fun video to make. And an essential topic, too! Understanding Git/GitHub and branches is imperative for a developer today.
I hope you're building something awesome that will make the world better. Please stay in touch, and let me know how it goes!
Thank you very much, your explanation was short, simple, straightforward and very very functional.
Thank you for creating this video. I was exactly looking for this.
Awesome! I'm glad it helped. Mastering the ability to merge one git branch to another is incredibly powerful.
I hope you're building something awesome!!!
took me so long to understand this but now it just all makes sense
thank you
I'm glad this video helped! Branches and version control can be tricky, but a very good concept to grasp. It makes software development much more effective.
Thanks for the easy explanation. Great Job and content!
Thank you! I appreciate your feedback. That helps me to make better videos!
Merging across Git branches in Visual Studio is a very effective way to manage multiple workstreams and multiple developers. I'm happy you found the video.
Power of Visuals it's just amazing the first slide itself explain things way better than going through any tutorial. Got what I wanted. Great work Brandon keep it up 👍
Thanks so much! I appreciate your feedback. That helps me a I record future videos. Many more coming, stay tuned!
Thank you for walking us through this merging branch to mater in visual studio! I just need to practice more and show to other team members. Awesome explanation and thanks for sharing your knowledge!
I'm happy it helped! Using git branches, and merging between them, is an incredibly useful skill, once you've mastered it.
Just completed my very first Pull Request, thanks for the help!
Outstanding! Pull requests are a fundamental part of good programming these days. I hope you're building something awesome!
Thank you for this video! As a visual stidio code user it's been weird not using the integrated terminal commands to manage git, this was exactly what I needed!
Awesome! I'm glad it helped.
The integration between visual studio and Git/GitHub is quite nice
I'm looking forward to trying out the GitHub Copilot integration as well. From what I've seen so far, it's amazing!
Thanks, really helpful. IMHO only thing missing was the last step - delete/archive the "secondary branch" after pushing to master
Totally agree! It's easy to end up with countless orphan branches. Best to delete them, if they serve no other purpose.
simple n good. thank you
I'm glad you liked it!
Knowing how to use GitHub with Visual Studio is powerful for any developer!
I love Visual Studio
Actions at @7:15 was what I was looking for (I done it the older way, through the option to Manage Branches - yours is quicker)
Awesome! Thanks for pointing that out. I hope you're building something amazing!
Very helpful. Thank you so much
I'm glad it helped! I hope you build something great.
Very helpful, thanks!
I'm glad it helped! Branches are a great way to handle multiple features across multiple releases.
Very Helpfull,Thank you
I'm glad it helped! I hope you're building something awesome.
Very helpful 👍
Thanks! I'm glad it helped.
Great video. Very simple, short and clear explanation. I've got just one question. If you want do update your branch (DynamicTitle) with Master, you should merge DynamicTitle with master, shouldn't I? Is there any other way to do it without merging?
Thanks so much for the comment - and apologies for the delay in response! I was off the grid for a couple of weeks.
Yes, if I'm updating, merge would go along with that, as well as resolving any merge conflicts. That's the cleanest way to make sure you are up to date.
I hope you're building something awesome! Let me know how it goes.
Have you had to deal with merges with two protected branches?
So after you are done with the feature change/add, do you go back and clean up/delete the branches? Or are branches there forever in your project? Seems a bit busy to have them there
Yeah, it's a good idea to clean up branches by delrting old ones. If you use branches for feature work, you can easily end up with several thousand!
@@discospiff Wow. It actually worked. Git merged the changes and told me it was safe to delete branch. Thanks a million.
@@bigdaddymccoy very cool! Thanks for sharing.
what if the changes in the branches has to change the code of the master before the point where the branch was created ? when the pull request for Branch1 is made, and it can influence the development based on what branch2 did... how that is managed ?
exemple : Master code has a class
br1 change that class for his dev to be successful
br2 works with the old class unchanged
the pull and merge of br1 will change the master class and br2 will change it back to the old one and bugs will be created.
that's how I understood your explanation.
I re-watch the video, you did answer that in the conflict pain ruclips.net/video/1XgFWN4TEpc/видео.html
A few thoughts:
1) Merge into current frequently, so that everyone is working with the same code. This also helps to identify conflicts early.
2) Conflicts like this will appear.during merge, and can be manually fixed/discussed.
3) SOLID: single responsibility. Keep classes small and focused.
4) Discuss potential conflicts like this during backlog refinement and sprint planning.
I hope this helps! -Brandan
@@discospiff yes it does, thanks. short saying that there should always be an orchester orchestrating the opera.
Mine is still called master - that's what it defaulted to at the time I created it and I see no reason to change it. We are talking about code - come on! We have things like "master plan" that we say and still say I think. Or "master carpenter" like good old Norm Abrahms who happens to be a proud yankee.