I have sample where git merge gives unexpected for me result.
Here master branch has commit #3 with unwanted changes. I checkouts to stable commit #2 and creates new branch with additional usage. Can I merge new_branch into master with all three lines? Thanks for help!

You can merge
new_branchintomasterthen revert #3.Or, you can reset
mastertonew_branchgit checkout master git reset --hard new_branch