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_branch
intomaster
then revert #3.Or, you can reset
master
tonew_branch
git checkout master git reset --hard new_branch