Before upgrading to the newest version, we used to be able to right-click a commit and select "Reverse Commit..." in order to run a `git revert` on that commit.
Now, it gives this error:
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks revert --no-edit -m 1 {SHA}
error: mainline was specified but commit {SHA} is not a merge.
fatal: revert failed
Completed with errors, see above.
Note that we do not use merges. I was just trying to revert a commit, I have no idea why it would specify -m. This used to work fine on a previous version of SourceTree.
@Teagan Strauss By default git revert refuses to revert a merge commit as what that actually means is ambiguous. I presume that your HEAD is in fact a merge commit. If you want to revert the merge commit, you have to specify which parent of the merge you want to consider to be the main trunk, i.e. what you want to revert to.
See above:
> Note that we do not use merges. I was just trying to revert a commit, I have no idea why it would specify -m. This used to work fine on a previous version of SourceTree.
> I presume that your HEAD is in fact a merge commit.
Nope. We use fast-forward-only. There are no merge commits. Just trying to revert a regular, non-merge commit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.