- Learnt how to roll back git commits using
git reset HEAD~ --hard
git reset HEAD~ --soft
will roll back the commits but leaving the changes staged so you can re-commit the change with some tweaks if necessary.git reset HEAD~{number} --hard
can be used if you want to rollback several commits in one go