How to rollback everything to previous commit

后端 未结 2 469
情话喂你
情话喂你 2021-01-30 16:28

Recently in a project with multiple people, a commit was made as seen in the image below. Marked in red you can see a commit with the description/comment of \'Merge?\'.

2条回答
  •  孤独总比滥情好
    2021-01-30 16:36

    I searched for multiple options to get my git reset to specific commit, but most of them aren't so satisfactory.

    I generally use this to reset the git to the specific commit in source tree.

    1. select commit to reset on sourcetree.

    2. In dropdowns select the active branch , first Parent Only

    3. And right click on "Reset branch to this commit" and select hard reset option (soft, mixed and hard)

    4. and then go to terminal git push -f

    You should be all set!

提交回复
热议问题