I am using Intellij and Git.
I mistakenly merged our development branch into our autoapproval_hierarchy_ui branch and pushed it to the remote repo. Now I would like to revert that merge.
Please can someone advise how I can do so?
I would like to basically have it exactly like it was before I did the merge, i.e. at 2020/04/06 at 10:35 (ass you can see in the picture below).

This means it will no longer have the changes from the development branch in the autoapproval_hierarchy_ui branch on the remote repo.
I have tried to 'Reset Current Branch to Here...',

and this sets my local workspace in the desired state,

but I cannot seem to push that state to the remote repo.
If I do a:
Git -> Compare with Branch... -> autoapproval_hierarchy_ui
There are all the merge differences.
UPDATE
Based on the comments from jessehouwing below, I think I can do the following:


In your example, you have merged unwanted changes from development to autoapproval_hierarchy_ui
Problem:
I made a test environment where I merged 4 commits from dev to remote main My current Git Model. Now I want to revert dev changes from remote main!
Solution:
Go to your IntelliJ Idea:
dev branch collides with main. From my Git Model Examle Git Model example it is where I have a commit: Merge pull request #1 from devRevert Selected Changesmain to the status before dev merge. Before dev merge.main with the next commands:git add .
git commit -m "YOUR COMMIT MESSAGE"
git push origin main
YOUR COMMIT MESSAGE - For example: Reverted last merge
Now you can see that main branch got rid of unwanted changes from dev branch: Final result
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With