A normal push will prompt Visual Studio to Pull then Push as your local branch is now 'behind' the the remote branchĭouble check your remote repository's branch history to ensure the old commit is removed. The '-f' is important, as this means forced push. Open up 'Package Manager Console', via Tools -> NuGet Package Manager -> Package Manager Console Once the configuration has been created, a single command will: Connect to the remote server via SSH.If you need to edit your changes, make them as your desire & commit the changes before moving on. Note: If you would like to remove all changes from previous commit, choose Delete Changes (-hard) instead.This option retains all changes from the previous commit If you need to create or import a repository, see Create a new Git repo in your project or Import a Git repository. You can use Visual Studio or Git commands to clone a repository, define local branches, commit and push changes, and sync with others. Choose Reset -> Keep Changes (-mixed). Get started with developing your code using Azure Repos and Git repositories.
Removing your previous commit from your local repo using Reset (Just for reference, I am using Visual Studio 2022) This is how you edit or remove a 'pushed' commit using Visual Studio.