在我正在处理的项目中,我需要使用pull requests将我的进展提交到一个repo中,并且每个提交都必须在不同的分支中。问题是最后三次提交被合并到一个pull request中,我现在需要将它们分别移动到不同的分支中。我尝试了回滚和创建新的分支,但发生了混乱,现在又回到了原点。
feature
,并且feature
有三个问题提交作为它最近的三个提交。feature
创建一个新的分支:git checkout -b onecommit
git reset --hard HEAD~2
git push origin onecommit
git checkout -b twocommits
git reset --hard HEAD~1
git push origin twocommits