cerbin
cerbin

Reputation: 1189

Undo changes after merged pull request

I have a branch development. I created a new branch X from it, and made some changes, then I created a new branch from X, branch Y, and in this branch I made big refactor of names of variables, like 30 files changed. After refactor I created pull request from branch Y to X, and merged it. Then i made some changes on branch X and then i created pull request and merged branch X to development. Can i undo branch Y, with these 30 files changed with refactor of names in it? If yes, how can I do it?

Demonstration:

Demonstration picture

Upvotes: 0

Views: 654

Answers (1)

Tim Biegeleisen
Tim Biegeleisen

Reputation: 520878

You could try reverting the commit in Y in which you did the renaming:

git revert <SHA-1 of Y commit

This should completely undo everything which happened in that Y commit, including the variable renaming.

To find the commit hash which you want to revert in development, one simple option would be to just use git log, which will show you a list of commits from most recent to earlier.

Upvotes: 2

Related Questions