When I learned about the reflog. I became less afraid of my changes when I knew I could easily recover from my errors. This allowed me to experiment more with git and become more proficient in it.
Another aha moment was learning that an easy way to squash commits is just to do a git reset followed by git commit -am “whatever”
When I learned about the reflog. I became less afraid of my changes when I knew I could easily recover from my errors. This allowed me to experiment more with git and become more proficient in it.
Another aha moment was learning that an easy way to squash commits is just to do a
git reset
followed bygit commit -am “whatever”
You can do that in a single step instead with
git commit -a --amend
.