revert
- Differently from reset, it
does not modify history - Take a
single commitandinverse all its changesmade in that commit - Create a
new commitwith those inverted changes
# Revert changes made by the last commit (HEAD)
git revert HEAD
# Rever changes made by a specific commit
git revert "SHA1"
Conflicts
- Conflicts can happen in revert operation
- In this case, conflicts must be solved and be staged
git add .
git revert --continue