Git merge misoperation

the project has two branches b1 , b1 modified the code, and then b2 went to merge b1 , found that there were more conflicts during the merger, temporarily decided not to merge , and then abandoned all changes (changes caused by the merger) directly, and then push went remotely, and now it is found that b2 is on b2 . If you want to re- merge b1 at this point, you will be all ready up to date . And now that there are many new submissions on b2 , it is not feasible to fall back directly to the merge operation. Could you tell me how to solve this situation?

Git
Apr.06,2021

are you sure you abandoned the merge with git merge-- abort ?

Please remember commit has, of b2 or backup b2
try using git reset-- hard ORIG_HEAD fallback

on b2.

first git log to view log information,
then copy b2's commit hash value before merging
local fallback execution command git reset-hard commit-hash (the previously copied hash value is more than 6 digits)
remote code replacement git push-f
and finally merge with b1.

Menu