git undo merge
git reset --hard HEAD~1
git reset --hard <commit_sha>
git undo merge
git reset --hard HEAD~1
git reset --hard <commit_sha>
revert last merge git
git revert -m 1 commit_hash
how to reset last merge to previous commit git
//run git log
//output may look something like this:
Author: raybags <[email protected]>
Date: Wed Jul 21 12:43:17 2021 +0200
debugging redirects
commit 353f4990b4f7d310ff3d6bd79e736d22fda4add1
Author: raybags <[email protected]>
Date: Tue Jul 20 21:26:59 2021 +0200
impliment redirects for deployment
commit 216fa3a0b0c1c82cb415a317a16e2c232bdb6b84
Author: raybags <[email protected]>
Date: Tue Jul 20 21:25:19 2021 +0200
//Select the "commit id" of the 2nd last commit your want to revert your master branch to
//i.e 353f4990b4f7d310ff3d6bd79e736d22fda4add1 (copy to clip bord)
//then run
git reset --hard 353f4990b4f7d310ff3d6bd79e736d22fda4add1
This will reset your master branch to its prevous state discadding all recent changes.
***goodluck***
git revert merge commit
// In this situation, will get you the tree as it was in 8989ee0
git revert <commit hash> -m 1
//will reinstate the tree as it was in 7c6b236
git revert -m 2
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us