Skip to main content
added 230 characters in body
Source Link
Cong Wang
  • 2k
  • 12
  • 13

Try git rebase -i, and use 'squash' for all the commits you want to squash.

Edit:

git rebase -i will show you an interactive editor with the list of commits you are rebasing. The default command before each commit is "pick", so you just need to s/pick/squash/ for all the commits you want to squash, and then all of them will be squash into their last previous commit.

Make sure you are rebasing on a correct branch.

Try git rebase -i, and use 'squash' for all the commits you want to squash.

Try git rebase -i, and use 'squash' for all the commits you want to squash.

Edit:

git rebase -i will show you an interactive editor with the list of commits you are rebasing. The default command before each commit is "pick", so you just need to s/pick/squash/ for all the commits you want to squash, and then all of them will be squash into their last previous commit.

Make sure you are rebasing on a correct branch.

Source Link
Cong Wang
  • 2k
  • 12
  • 13

Try git rebase -i, and use 'squash' for all the commits you want to squash.