How to squash specific commits that have been pushed to remote?
I have made the following commits in my branch and pushed them to remote
commit 5
commit 4
commit 3
commit 2
commit 1
I now want to squash commits 1, 2 & 3 and remove commits 4 & 5 (dont need the changes anymore) How can i do this?
Once pushed, you cannot easily change the history without affected other users, so it becomes a communication problem.
One approach would be:
master
” branch for both local and remote repository" branch
to the new origin/branch
下一篇: 如何压缩已推送到远程的特定提交?