历史情况如下:
master branch 1-2-3-4
\
feature branch 5-6-7我意识到更改2、3和4也应该进入我的特性分支,并希望按如下所示移动它们。
master branch 1
\
feature branch 2-3-4-5-6-7我该怎么走?没有其他人使用我的回购,自从创建分支并提交所有更改后,我还没有按下提交。
发布于 2019-07-20 13:21:17
只需从主人处删除违规提交即可。它们仍然在你的特征分支中:
git checkout master
git reset --hard 1 # Replace '1' with the actual SHA for the commit
git push -f origin master # Sync to remote, if applicablehttps://stackoverflow.com/questions/57125120
复制相似问题