Skip to content

Instantly share code, notes, and snippets.

@esthervillars
Created November 13, 2018 20:03
Show Gist options
  • Save esthervillars/6614c1c20247d833c704791bda00d809 to your computer and use it in GitHub Desktop.
Save esthervillars/6614c1c20247d833c704791bda00d809 to your computer and use it in GitHub Desktop.
Reverting changes to develop or master (Rolling Forward).
To revert a merge to develop (e.g. a pull request), generate a commit that is the reverse of the pull request merge
git revert -m 1 <sha>
See example PR ...
Adding back reverted changes to develop or master
To add back reverted changes, cut a new branch and generate a patch from the original commit/merge
git format-patch -1 <sha>
Apply this patch and commit as a new commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment