git - going back to a certain commit -
this question has answer here:
- how revert git repository previous commit? 33 answers
- revert multiple git commits 11 answers
i needed rollback branch few commits back, newer commits introduced bugs.
i tried solve problem of stackoverflow , googling git tutorials, feel made worse. right git branches this:

the blue line called development, pink - master.
my actions checkout new branch selected commit, checkout master rid of detached head , merge 2 branches. merging brought bugs "bad" commit.
how can rollback first bullet point in tree , erase buggy commits existence?
there many ways this. if on master, way i'd follows:
git branch safetykeep branch @ oldheadgit reset --hard abc123movemasterold commit, assuming commitabc123git branch -d safetydiscard safety branch, if desired
Comments
Post a Comment