Search code examples
version-controlgit-mergeatlassian-sourcetree

How do I undo a merge , after I merged a branch into master branch


enter image description here

Guys I want to unmerge this localdevelopment branch from my master branch , also I pushed the master to origin/master , so now the commit history has also changed in the remote where in master branch I am also seeing the commits of this localdevelopment branch because I merged it , I only want the blue dots / commits from the above pic to be shown in the master branch , any fix for this.


Solution

  • git log
    copy commit from there and then

    git reset --hard "your commit"
    git push -f origin master

    try this :)