Undoing the last commit
Në shqip: Anulimi i commit-it të fundit
ShpjegimiSQ
Po s'e ke bërë push: git reset --soft HEAD~1 e anulon commit-in por i mban ndryshimet. Po e ke bërë push: git revert HEAD krijon commit të ri që e anulon, pa rishkruar historinë.
EnglishEN
If you haven't pushed: git reset --soft HEAD~1 undoes the commit but keeps the changes. If you have pushed: git revert HEAD creates a new commit that undoes it, without rewriting history.
Si ta mendosh
Si të heqësh letrën nga kutia postare para se të vijë postieri, ose të dërgosh një letër korrigjuese pas saj.
Lexoje në anglisht
Like taking a letter back out of the postbox before collection, or sending a correction after it.
Shembull kodibash
git reset --soft HEAD~1
git revert HEAD