Search code examples
gitatlassian-sourcetreegit-flow

sourcetree: can you reverse "finish feature"?


I did "finish feature" in git flow by mistake (without deleting), can it be reversed?

enter image description here


Solution

  • Lookup the history with git log and copy the hashes of last commits before the merge on both branches.

    git checkout develop
    git checkout -b feature
    git reset <hash of feature commit before merge> --hard
    git checkout develop
    git reset <hash of develop commit before merge> --hard