你有两个选择,
比如,您想要包含最近五次提交中的三次:
git rebase -i HEAD~5 # reorder the lines in the text editor,
# leave the 'private' commits at the end
git push origin HEAD~2:master # push all but the last two
Run Code Online (Sandbox Code Playgroud)
这涉及一个临时分支,还有很多工作要做
git checkout -b temp HEAD~5
git cherrypick <hash1>
git cherrypick <hash2>
git cherrypick <hash3>
git push origin master
Run Code Online (Sandbox Code Playgroud)
--cherry-pick或--cherry-mark optionswith git log来查看refs()之间的实际差异git log --cherry-pick --oneline master...origin/master| 归档时间: |
|
| 查看次数: |
141 次 |
| 最近记录: |