TL;DR:
Use git reset --soft HEAD~ in the cmd from the .sln folder
I was facing it today and was overwhelmed that VSCode suggests such thing, whereas its big brother Visual Studio doesn't.
Most of the answers weren't helpful; if I have more commits that were made before, losing them all would be frustrating.
Moreover, if VSCode does it in half a second, it shouldn't be complex.
Only jessehouwing's answer was the closest to a simple solution.
Assuming the undesired commit(s) was the last one to happen, Here is how I solved it:
Go to Team Explorer -> Sync.
There you'd see the all the commits. Press the Actions dropdown and Open Command Prompt

You'll have the cmd window prompted, there write git reset --soft HEAD~.
If there are multiple undesired commits, add the amount after the ~ (i.e git reset --soft HEAD~5)
(If you're not using git, check colloquial usage).
I hope it will help, and hopefully in the next version VS team will add it builtin