Git squash part 02
2020-09-17 本文已影响0人
JaedenKil
We can use command git rebase -i
to squash commits.
However, there is another way:
- Remove all unwanted commits, but keep the changes
git reset --soft ${commitId}
- Make new commits
git add -u
git commit --amend "xxx"
OR
git add -u
git commit --amend -m "XXX"