git reset --soft, --mixed, --hard
Në shqip: Mënyrat e git reset
ShpjegimiSQ
--soft e lëviz degën mbrapa por i mban ndryshimet në staging; --mixed (parazgjedhja) i mban në skedarë por jo në staging; --hard i fshin plotësisht. --hard është i rrezikshëm — por reflog-u ende të shpëton.
EnglishEN
--soft moves the branch back but keeps changes staged; --mixed (the default) keeps them in your files but unstaged; --hard deletes them entirely. --hard is dangerous — but the reflog can still save you.
Si ta mendosh
Si tre nivele të fshirjes: në draft, në tavolinë, ose në kosh.
Lexoje në anglisht
Like three levels of undo: back to drafts, onto the desk, or into the bin.
Shembull kodibash
git reset --soft HEAD~1
git reset --hard origin/main