Skip to content

git squash

  1. checkout feature branch
git checkout bug_fix
  1. act and operate on previous 3 commits from head
git rebase -i HEAD~3
  1. change the commits you want to collidate to "squash" instead of "pick"
  2. "squash" means consolidate to the previous "pick" commit
  3. next you will need to edit the commit message of the squashed commit. this will be the updated commit message

reference video

video from youtube