>_
Git: Revert a commit without rebase
Say you want to revert a commit you made but you've already pushed to origin.
A fast way to do this, though probably not a solution every time.
Git log
Get the hash of the previous commit
Git reset --hard {previous commit hash here}
Git diff origin/{branch name} > reset.patch
The above command will...
6 Oct 2023, 11:39 a.m.
Home