How can a commit to git be reverted

18 months ago by

If you've pushed a commit to your fork and it's in a PR, or worse merged, fear not, the update can be easily reversed.

1. Make sure your fork is up to date, click it to see the commit history.

2. Find the commit you want to revert, right click it and select Revert

 3. Click Revert on the pop-up that get displayed

 4. In the Working Copy area, a reversal of the changes for that commit will be displayed i.e. if a new class member was added in the commit Working Copy will now show that member as deleted.

5. Commit the changes and push to your fork and all done


1 Answer

18 months ago by

Answer is in the question - just adding this so on the main page it shows this question as having been answered.

Please login to add an answer/comment or follow this question.

Similar posts:
Search »