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.
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.
any idea why squash commits is greyed out in visual studio?
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.
Is it possible to squash intermediate commits in Visual Studio? Ex at 7:14, squash 4 commits except "sample commit #5"
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.
Thanks dude
No problem