I merged 6 PRs into master and someone reverted them all. Now I need to re-submit them as pull requests.
I thought I could use git revert <revert_commit_sha>
. This actually does work for the newest of the revert commits. However when I try and revert the previous revert commit, it says:
nothing to commit, working tree clean
As a workaround I tried to use git cherry-pick <original_commit_sha>
as advised from how-do-i-un-revert-a-reverted-git-commit, but I see this:
nothing to commit, working tree clean The previous cherry-pick is now empty, possibly due to conflict resolution.
Not sure what I should do, and why this revert is not working while the first one I tried did work.
I also tried the following steps:
- reset --hard to the original commit
- (soft) reset to the commit before this point, so the changes are unstaged
- stash the changes
- reset --hard the branch to master state
- stash apply
However it says this message again when I try and stash apply:
nothing to commit, working tree clean