[Git] Squash commits

git checkout yourBranch
git reset --soft HEAD~$(git rev-list --count HEAD ^master)
git add -A
git commit -m "one commit on yourBranch"
posted @ 2021-10-01 16:45  Zhentiw  阅读(233)  评论(0)    收藏  举报