3. Squashing several commits into one
git checkout -b squash
for c in H e l l o , ' ' w o r l d; do
echo "$c" >>squash.txt
git add squash.txt
git commit -m"Add '$c' to squash.txt"
doneHow to squash commits
git log --oneline

Last updated