【发布时间】:2018-08-26 07:18:30
【问题描述】:
我不小心将一个远程分支拉到了我的本地分支中,解决了合并的冲突,并再次对功能分支提交了一些不同的更改。我可以只从远程分支恢复拉取,而不会丢失我此后所做的提交,或者还有什么可以解决这种情况?工作流程类似于:
git checkout my_feature
git pull origin wrong_branch
git commit -am "Resolving merge conflict"
git push
git commit -m "Some other commit to my_feature"
git commit -m "Another commit to my_feature"
git push
【问题讨论】:
-
你应该可以在
git reflog找到之前的状态。
标签: git git-merge git-pull git-revert