# Squash and merge branch into main ```bash git checkout main // OR: master git merge --squash targetBranch git commit ```