I had two branches, the main one and a feature branch. After changing something in the main branch (I know now, that's bad practice. I found out the best practice for changes and I'll do it by the book next time) I merged the main branch into the feature branch.
The merge went bad, so I reset the branch back to the last commit before the merge. This went well. Only problem is, if I want to commit any new changes, the merge gets included again.
I tried rebasing the branch, I wasn't successful.
I just want to completely delete the merge and get back to the last commit, Is that possible?
Hope is by now you've figured out you shouldn't develop directly on the main branch. You should take the following steps:
如果由于冲突而不想合并它,请尝试使用git merge --abort
命令。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.