How to git revert a commit using a SHA -


how can revert commit given sha? want remove changes given sha? want keep commits made before & after give sha. want remove changes of specified sha.

i have read revert commit sha hash in git?, understanding reset commits made after sha want revert. not way want.

you can use git revert <commit hash> try revert changes made commit. not remove commit history, make changes undo new commit. in other words have first commit still in history, , additional commit on head of branch effective inverse of original commit.

if have not yet shared changes else, possible remove original offending commit history altogether using git rebase. there details in this post.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -