3 ms·
git reflog has the previous refs, git reset --hard does not remove anything that has been committed. It will however nuke changes that are not committed. Which
by jononor 9y ago
git reflog has the previous refs, git reset --hard does not remove anything that has been committed.
It will however nuke changes that are not committed. Which is exactly what I use it for... But your script sounds like a decent solution if you want also that to be undoable