How to undo your commit?
git revert
vs git reset --hard
?
git reset HEAD
unstage files from index and reset pointer to HEAD
git reset --soft
moves HEAD
to specified commit reference, index and staging are untouched
git reset --hard
unstage files AND undo any changes in the working directory since last commit
Can you get your patch back if you done git reset
?
git reset HEAD
unstage files from index and reset pointer to HEAD
Reference logs, or “reflogs”, record when the tips of branches and other references were updated in the local repository.