0

We have a dev branch, and a separate feature branch which I've been working. Using GitHub's UI, I've accidentally merged the dev branch (and all it's new commits) into the feature branch.

I want to purge all of the dev branches changes. I thought about creating a new branch, then just cherry picking from the feature branch given the mess this has created.

Here is the Git log graph if that helps.

| *   14d6767 (origin/feature/) Merge branch 'development' into feature/
| |\
| |/
|/|
* |   2d88b27 Merge remote-tracking branch 'origin/master' into development

1 Answers1

1

You could:

  • git reset commit_before_merge
  • git checkout commit_before_merge followed by git checkout -b feature/this_works, and then, optionally, cherry-pick in any other changes that look OK
tymtam
  • 31,798
  • 8
  • 86
  • 126