How to remove an unpushed outgoing commit in Visual Studio?
How to remove an unpushed outgoing commit in Visual Studio?
How to remove an unpushed outgoing commit in Visual Studio?
Re: How to remove an unpushed outgoing commit in Visual Studio?
Open the history tab in Team Explorer from the Branches tile (right-click your branch). Then in the history right-click the commit ***before*** the one you don't want to push, choose Reset. That will move the branch back to that commit and should get rid of the extra commit you made. **In order to reset before a given commit you thus have to select its parent.**
[](https://i.sstatic.net/VRHRI.png)
Depending on what you want to do with the changes choose **hard**, which will get rid of them locally. Or choose **soft** which will undo the commit but will leave your working directory with the changes in your discarded commit.
[](https://i.sstatic.net/VRHRI.png)
Depending on what you want to do with the changes choose **hard**, which will get rid of them locally. Or choose **soft** which will undo the commit but will leave your working directory with the changes in your discarded commit.