Inside Visual Studio 2015 how to reverse/undo a commit in Git?

Asked

Viewed 2,703 times

1

I have a commit made by a developer in the remote Git repository hosted on VSTS that needs to be reversed. From Visual Studio, without going to prompt commands like reverting commit?

2 answers

6


For the English language version:

Team Explore > Branchs > Right click on Branch > View History

A list will appear with the commits, right clicking on some you have the option of Revert.

1

If the code is already in the VSTS repository, you will need:

  • Reverse the commit locally
  • Do push -force

It is not possible to reverse commit to a repository directly on VSTS, so the two steps. Which is actually more of a Git feature than a VSTS feature.

In Git you always interact with your repository and send it to the Server. Git is a DVCS, not a CVCS, changes are always local and replicated to repositories, unless you connect by SSH to a Git server, which is not supported in VSTS.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.