how do you git push only the new commit

This question already has an answer here:

  • Squash my last X commits together using Git 23 answers
  • Combining Multiple Commits Into One Prior To Push 4 answers
  • Squash all my commits into one for GitHub pull request [duplicate] 4 answers

  • It is just a normal push. I am pretty sure what they mean there: you push just the squashed commit - not the commits that existed before the squash. Lets say you made commit 1/2/3 and squashed to 4 - then you push with a normal git push - then commit 4 is pushed and exists remote (eg on github) and 1/2/3 only exist locally

    链接地址: http://www.djcxy.com/p/27622.html

    上一篇: 合并后,Git commit显示超过100次提交

    下一篇: 你怎么git只推新的提交