## si quiero juntar los ultimos 8 commits en uno solo, escribo...
git rebase -i HEAD~8
#/*Junta las ramas,
#el numero significa cuantos de los ultimos commits va a juntar*/re
## check the commits i want to get together
git log --oneline
## select the range of commits you're going to manage
## 1. from current commit to some specific sha or commit
git rebase -i <sha-or-commit>
## 2. from current commit to an amount of commits ago
git rebase -i HEAD~8
## 3. from specific sha or comit to another specific sha or commit
# generate a sha that contain that info
git merge-base <newer-sha-or-commit> <older-sha-or-commit>
# set the interactive rebase with that sha in reference
git rebase -i <sha-or-commit>
## a code editor should be open, all the commits are shown
## just change pick to squash to mix those commits and save
## after that, you should select one commit message for the mixing & save
# sin editar el mensaje del último commit
git commit --amend --no-edit
git commit --amend ## opcion de cambiar el nombre del commit
# editando el mensaje del último commit
git commit --amend -m "nuevo mensaje para el último commit"
# eliminar el último commit
git reset --hard HEAD~1