xgqfrms / git-testing-all-in-one

git-testing-all-in-one πŸš€πŸ‘»βœ…
https://www.cnblogs.com/xgqfrms/p/14821373.html
MIT License
1 stars 0 forks source link

git revert merge #2

Open xgqfrms opened 4 years ago

xgqfrms commented 4 years ago

git revert merge

Rollback

https://stackoverflow.com/questions/2389361/undo-a-git-merge-that-hasnt-been-pushed-yet

https://stackoverflow.com/questions/7099833/how-to-revert-a-merge-commit-thats-already-pushed-to-remote-branch

https://stackoverflow.com/questions/11722533/rollback-a-git-merge/29110174

xgqfrms commented 4 years ago
$ git log
# q === quit

$ git reflog

image

xgqfrms commented 4 years ago

image

$ git revert -m 1 "commit_hash"
$ git reset --hard commit_sha
xgqfrms commented 4 years ago

https://www.christianengvall.se/undo-pushed-merge-git/

xgqfrms commented 4 years ago

3fbcf7783c34163321a3fb320a42bd09e49db3d6

image

xgqfrms commented 4 years ago

image

image

xgqfrms commented 4 years ago

image

5f2b18967eb3f0187f41941e8d7121832d68ef99

image

xgqfrms commented 4 years ago

https://github.com/xgqfrms/git-revert/commit/89ee651d9846ed311d3b1c73b61b419dac845c0b

89ee651d9846ed311d3b1c73b61b419dac845c0b

image

image

xgqfrms commented 4 years ago

image

image

xgqfrms commented 4 years ago

git 图解教程

https://www.cnblogs.com/xgqfrms/p/12094351.html