Squash Merge: Using Command line, DevOps, or Visual Studio

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 พ.ย. 2024

ความคิดเห็น • 6

  • @rahulchawla958
    @rahulchawla958 ปีที่แล้ว +1

    any idea why squash commits is greyed out in visual studio?

    • @DataVids
      @DataVids  ปีที่แล้ว

      In visual studio 2022, I believe you have to highlight the commits you want to sqash, so if you go to git->manage branches from the git drop down, then in your 'outgoing' section there should be at least 2 if your using sqash, highlight them, then right click and squash should not be disabled.

  • @nicolasm1753
    @nicolasm1753 2 ปีที่แล้ว +1

    Is it possible to squash intermediate commits in Visual Studio? Ex at 7:14, squash 4 commits except "sample commit #5"

    • @DataVids
      @DataVids  2 ปีที่แล้ว

      That's a great question. I don't have a safe way to do that though I believe its possible with command line using git rebase, and picking all but #5. Personally to be safe if I wanted only certain ones & wanted to stay in visual studio then I would cherry pick the ones I want and then build a combined commit message for the cherry picked items after they have been merged into my branch before pushing. Since this question is specific and not something I have done much with you might be best to ask it on Stack Overflow, I expect you could get a good response there and if you do so please post the question in here I would love to see that answer.

  • @shameerakalubowila
    @shameerakalubowila 2 ปีที่แล้ว +1

    Thanks dude

    • @DataVids
      @DataVids  2 ปีที่แล้ว

      No problem