Removing/undoing a merge on Sourcetree

后端 未结 4 1862
旧时难觅i
旧时难觅i 2020-12-07 13:10

I made quite few changes in my project (I was working on a remote branch and not the master), I committed them and created a pull request on BitBucket and merged the branch

4条回答
  •  佛祖请我去吃肉
    2020-12-07 14:05

    Follow this step by step:

    REVERTING A MERGE COMMIT

    Master was merged and pushed into Develop with conflicts/unwanted codes.

    To revert using Sourcetree:

    1. Select Develop, Select the last commit to which branch has to be reverted.
    2. Right click on that branch and select “Reset develop to this commit”.
    3. From the pop up select hard from drop down at the left bottom. Its done.

    There should be no pull thereafter. If any pull occurs revert using terminal as below.

    Now Merge master into develop.

    To revert using Terminal:

    1. Select Develop, Select the last commit to which branch has to be reverted.
    2. Open terminal from the Sourcetree
    3. type git reset --hard
    4. If any pull count appear in the sourcetree then type git push -f, and its done.

    Merge master into develop.

提交回复
热议问题