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.

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

  • @corollagl82
    @corollagl82 8 месяцев назад +2

    Havent understand git until this video. thanks a lot.

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

      Awesome, I'm glad it helped! Git/GitHub are fundamental to being an excellent developer. I hope you're building something great!

  • @OmronOmicron
    @OmronOmicron 7 месяцев назад +2

    Great Job! You are a solid teacher. Learned a lot from this video, keep up the good work!

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

      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!

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

    Thank you very much, your explanation was short, simple, straightforward and very very functional.

  • @minitam1527
    @minitam1527 9 месяцев назад +1

    Thank you for creating this video. I was exactly looking for this.

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

      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!!!

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

    took me so long to understand this but now it just all makes sense
    thank you

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

      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.

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

    Thanks for the easy explanation. Great Job and content!

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

      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.

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

    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 👍

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

      Thanks so much! I appreciate your feedback. That helps me a I record future videos. Many more coming, stay tuned!

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

    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!

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

      I'm happy it helped! Using git branches, and merging between them, is an incredibly useful skill, once you've mastered it.

  • @Tom-lg3mh
    @Tom-lg3mh Год назад

    Just completed my very first Pull Request, thanks for the help!

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

      Outstanding! Pull requests are a fundamental part of good programming these days. I hope you're building something awesome!

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

    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!

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

      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!

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

    Thanks, really helpful. IMHO only thing missing was the last step - delete/archive the "secondary branch" after pushing to master

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

      Totally agree! It's easy to end up with countless orphan branches. Best to delete them, if they serve no other purpose.

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

    simple n good. thank you

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

      I'm glad you liked it!
      Knowing how to use GitHub with Visual Studio is powerful for any developer!

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

    I love Visual Studio

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

    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)

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

      Awesome! Thanks for pointing that out. I hope you're building something amazing!

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

    Very helpful. Thank you so much

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

      I'm glad it helped! I hope you build something great.

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

    Very helpful, thanks!

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

      I'm glad it helped! Branches are a great way to handle multiple features across multiple releases.

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

    Very Helpfull,Thank you

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

      I'm glad it helped! I hope you're building something awesome.

  • @shaikhmaheen
    @shaikhmaheen 2 года назад

    Very helpful 👍

    • @discospiff
      @discospiff  2 года назад

      Thanks! I'm glad it helped.

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

    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?

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

      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.

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

    Have you had to deal with merges with two protected branches?

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

    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

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

      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!

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

      @@discospiff Wow. It actually worked. Git merged the changes and told me it was safe to delete branch. Thanks a million.

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

      @@bigdaddymccoy very cool! Thanks for sharing.

  • @tarik9563
    @tarik9563 2 года назад

    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.

    • @tarik9563
      @tarik9563 2 года назад

      I re-watch the video, you did answer that in the conflict pain ruclips.net/video/1XgFWN4TEpc/видео.html

    • @discospiff
      @discospiff  2 года назад

      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

    • @tarik9563
      @tarik9563 2 года назад +1

      @@discospiff yes it does, thanks. short saying that there should always be an orchester orchestrating the opera.

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

    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.