Handling Merge Conflicts with Visual Studio and SourceTree (7 of 9)

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

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

  • @DaviesOdu
    @DaviesOdu 6 лет назад +6

    Resolve merge conflict with visual studio starts at 3:29

    • @DrDana
      @DrDana  4 года назад

      Thanks for letting others know! I created these for my students, which is why there is a little more explanation.

  • @Caffeine_Addict_2020
    @Caffeine_Addict_2020 4 года назад +6

    Incredible video Dana!! This was, and has been, a lifesaver. I come back to this video every time I have to deal with a merge-conflict in sourcetree. Thank you so much!!

    • @DrDana
      @DrDana  4 года назад

      Wow, what wonderful feedback! Thank you so much! I'm glad it was helpful!

  • @Urbie4
    @Urbie4 5 лет назад +1

    Thanks, Dana! I'm new to Sourcetree, and since it doesn't come with much doc, tutorials like these are just what I need! :)

    • @DrDana
      @DrDana  4 года назад

      Awesome, glad they were helpful!

  • @paulosovienski322
    @paulosovienski322 3 года назад +1

    Thanks Dana, You were very helpful.

    • @DrDana
      @DrDana  3 года назад

      Thanks! So glad you got some value from it!

  • @mohankumar8649
    @mohankumar8649 4 года назад +1

    Thank you Dana !! Nice video to learn the merging concept!

    • @DrDana
      @DrDana  4 года назад

      Thank you so much! I'm glad you learned something useful!

  • @Gabriel-az
    @Gabriel-az 5 месяцев назад

    Thank you, Dana!

  • @DougKelleyDeveloperAccountant
    @DougKelleyDeveloperAccountant 4 года назад +1

    Thank you so much! Understanding the merge interface in VS2019 was what I was looking for, and you answered it perfectly! :)

    • @DrDana
      @DrDana  4 года назад

      Thanks! Glad it was helpful!

  • @matthewvaughan4838
    @matthewvaughan4838 6 лет назад +1

    Great tutorial Dana. Thanks for posting.

    • @DrDana
      @DrDana  4 года назад

      Thank you! Glad it was helpful!

  • @cango75
    @cango75 5 лет назад +1

    Thanks Dana, currently trying to get to grips with this and your videos have helped :-)

    • @DrDana
      @DrDana  4 года назад

      So glad to hear that!

  • @johndematis8331
    @johndematis8331 4 года назад

    Great tutorial series. One question though: Why didn't you push to the remote branch DanaW, so as to bring that up to date, before attempting a pull request?

    • @DrDana
      @DrDana  4 года назад

      At 1:57, you'll see a checkbox that says "Push changes immediately to origin/ DanaW" - this automatically updates the remote branch so that i don't have to perform a separate push. You want to be careful using this feature, but in this case, since i am committing to a branch that no one else should be using, i can safely use this!

    • @johndematis8331
      @johndematis8331 4 года назад

      @@DrDana I must have missed that. Thanks for clarifying!

    • @DrDana
      @DrDana  4 года назад +1

      @@johndematis8331 i think i talked about it in another video, so in this one it wasn't directly addressed, so you didn't miss anything!

  • @gdk870
    @gdk870 3 года назад +1

    Hello Dr. Dana, might you have made a mistake by saying "before I attempt to make a Pull request", when you meant to say "before I attempt to make a push request" @02:42? Or am I just confused?

    • @DrDana
      @DrDana  3 года назад

      Great question, those terms are confusing! The difference between a pull request and a push (there is no push request) is that a pull request is used when an approval process is in place and you want to request that your supervisor approve your changes before they are merged into master. If you're working on your own and not in a team, you can just push directly to master. The terminology is a little odd, but those are the standard terms used with git. Thanks!

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

    This tutorial is still a lifesaver today! Thank you so very much!

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

      Glad it helped!

  • @starlite5097
    @starlite5097 4 года назад +1

    Thanks, very informative and this series is exactly what I want.

    • @DrDana
      @DrDana  4 года назад

      So glad it was helpful!

  • @simranjeetsingh6002
    @simranjeetsingh6002 4 года назад +1

    helped me a lot thanks Doctor.

    • @DrDana
      @DrDana  4 года назад

      Great to hear!

  • @sandeep8585
    @sandeep8585 3 года назад

    I am completely new to visual studio. I see there is Visual Studio Code and Visual Studio. Which one should I use? Thanks!

    • @DrDana
      @DrDana  3 года назад

      Many of the features are available in both. VS Code is a little less fully featured than Community or Enterprise (the true professional's version). There are some limitations on both sides, for example VS Code can run Java but VS Community cannot. I think there is something that Community can do that VS Code can't, but I don't remember off the top of my head. Community will better prepare you for professional tools and work.
      This is a decent run-down of the main decision points: www.infoworld.com/article/3436860/visual-studio-code-vs-visual-studio-how-to-choose.html

  • @KaylaBurns-dz7hb
    @KaylaBurns-dz7hb Год назад

    THANK YOU SO MUCH I so appreciate this, so helpful

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

    Thank You Very Much, this is what is was looking for. Saviour.!!

  • @Izumi70V3Naruto
    @Izumi70V3Naruto 4 года назад

    Why my merge conflict pop up / page didnt show??? Its merge the code by themselves..

    • @DrDana
      @DrDana  4 года назад

      I'm not quite certain what you mean. Conflicts arise when there are 2 sets of changes made to the same code. Are you sure that the changes you made conflicted with the changes someone else made (like you both had to change the same file)? If the changes made are mutually exclusive and don't overlap, then git/sourcetree will merge them automatically and not present a merge conflict.

  • @chingching4895
    @chingching4895 4 года назад

    Thanks, Dana! I'm new to SourceTree, how to handle the branch after merge to master? I try to delete the branch, the red label with "branch" name disappear but the graph still showing the [origin/{branch name}] which is in RED color. Do you know why?

    • @DrDana
      @DrDana  4 года назад

      Hmmm...I don't know, I've tried a few variations to try and replicate that behavior and I can't get the same thing to happen. But if you right-clicked on the branch name in sourcetree's branch list (left-hand side panel) and then selected Delete, all that does is delete your local branch, so perhaps you're still seeing the remote branch? If you deleted the branch through github/bitbucket, then try performing a Fetch -> Fetch all/Prune all/Update tags and see if that gets rid of those red labels.

  • @mido5219
    @mido5219 4 года назад +4

    this was extremely helpful and it's just what i needed so thank you.

    • @DrDana
      @DrDana  4 года назад +2

      Thanks, so glad it helped you!

  • @BigyanChap
    @BigyanChap 4 года назад +1

    u deserve more subscribers

    • @DrDana
      @DrDana  4 года назад

      Wow! Thank you so much for the encouragement! I will be adding some more content soon, so hopefully that will attract some new people!

  • @anuranjansrivastav9864
    @anuranjansrivastav9864 5 лет назад +1

    Thank you so much for the video..

    • @DrDana
      @DrDana  4 года назад

      You're very welcome! Glad it was useful!

  • @dattu06
    @dattu06 4 года назад

    Great Video. All videos i see are working with only 1 file that has conflicts.
    I am looking for a scenario where 1 file is in conflict and there are some new changes in the branch where i will be raised pull request.
    I have a question. Our process is little different. We are using bitbucket
    Can you let me know what would be the right way to do it
    master
    every week we create release_week
    each developers creates branches for bugs from master, after that pull request to release and merge it.
    I have a case where i modified 2 files. when i created pull request to release, it showed merge conflict on one file.
    I followed similar to above steps
    git pull origin releasebranch
    this bought all the files that are changed in release (master to release) to my local.
    1 merge conflict file and 5 files that have changes in release branch
    I resolved the merge conflict of the one file it complained.
    --
    But i need to push all the other files from release again to my branch. This will show up like i made changes to the files in the pull request. Those changes are from release branch, i did not change them.
    can you tell me the better way to do it so that my pull request will have only the changes needed. I don't need to show automerge files that are in release as new changes in my branch.

    • @DrDana
      @DrDana  4 года назад +1

      If I'm understanding your question correctly, when you pulled from master into your local branch, it showed 1 conflict (which you resolved) and then 5 additional files that you will need to add to your branch.
      Unfortunately, this is a necessary step in the process of getting your work to be merged into master - you will need to pull the changes from master into your branch, commit them, test your branch again to make sure everything still works as it did before, and then you can do the pull request to master.
      The reason you always need to pull master's changes into your branch is to ensure that those changes will not conflict with yours in some way. Think about it this way - if you and someone else both modified the same code (thus a conflict) and they added a reference to class X (one of the new files) and you didn't bring class X into your branch, after the conflict resolution - your code would no longer build on your branch since the conflict was resolved to add this new reference to class X (if you didn't keep this reference, you would be throwing away your teammate's work, so yes, it will be integrated into your branch).
      When you do the pull request to master, it will not show those 5 files as new, github keeps track of when files are added and won't duplicate the addition. However, it will show those 5 files added to your branch in a commit.
      So, tl;dr - before doing a pull request, always pull from the master branch (or the branch you'll be merging to), integrate any changes into your own branch, test your branch again, commit those changes, and then do the pull request. Any files that were already in master (like the 5 that weren't conflicting) will not be added again.
      Hope this was helpful!

    • @dattu06
      @dattu06 4 года назад

      Dr. Dana W thanks for the detailed explanation. That was really helpful.

  • @jalersekarmaji180
    @jalersekarmaji180 3 года назад

    Thank you Dr. Dana

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

    Wait is this video only about fixing merge conflicts with scripts? How about if there are merge conflicts with scenes in unity?

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

      Unfortunately, it is very difficult to correctly merge scene files unless the changes were minor. Scene files can be stored as text files, but in my experience, it is easier for the team to coordinate changes to scenes and prefabs instead of trying to merge them. It is very difficult to make sure the merge is correct and all the guids are referenced correctly. Since these videos were created specifically for my students, I encourage them to avoid merging scenes and prefabs as the process is error prone.
      However, take a look at the scene file in your favorite text editor (like notepad++) and you'll see the data is stored in the yaml format. Unity describes this format and the codes for various objects in their documentation. docs.unity3d.com/Manual/TextSceneFormat.html
      You also have to enable this setting in the editor's project settings.

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

      @@DrDana ok thanks for the tip ma'am.

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

    thank you

  • @misterguts
    @misterguts 7 лет назад +1

    Thank you Dana, this was exactly what I needed to learn today! Take care!

    • @DrDana
      @DrDana  7 лет назад

      cbmira01yt so glad that it helped you!

  • @ruchamudalgikar3979
    @ruchamudalgikar3979 3 года назад

    Very useful video👍👍

  • @pouyanshekari-kiani3165
    @pouyanshekari-kiani3165 3 года назад

    Very helpful👌

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

    Great! thanks

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

    thankyou so much

  • @rahulgautam8440
    @rahulgautam8440 3 года назад

    Thanks

  • @beautyovercities2643
    @beautyovercities2643 3 года назад

    Please add more cpp debugging sessios

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

      That's a great suggestion, thanks!!

  • @YPs1998
    @YPs1998 6 лет назад +1

    AWESOME....

    • @DrDana
      @DrDana  4 года назад

      Great to hear that! Glad you found it useful!

  • @_XY_
    @_XY_ 3 года назад

    Nice

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

    Four minutes into the video, she tells you that she’s not using sourcetree to do the merge.👎👎👎👎

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

      I'm sorry for any confusion! I tried to be clear in the title by putting VS first indicating that I'd be using VS as the primary merge conflict handling tool.
      However, at least at the time, Sourcetree did not have a built-in diff tool (usually requiring kdiff or some other external diff tool integration - but even kdiff doesn't compile the code!). I elected to use VS as my external diff tool and encourage others to do the same.
      VS is the best merging/diff tool since it not only works the same as any other diff tool (3 split panels - mine, theirs, and merged), but it also can show you whether the code can be compiled or not - a feature few (if any) diff tools provide! This is why I use VS for merge conflicts.