I have two branches: master and experiment. Both of them evolved separately and are very different now. Now I am ready to make experiment branch my master branch.
If I try
git checkout master
git merge experiment
I get tons and tons of error.
What is the easiest way to get experiment branch to become master without loosing all the history of experiment branch.
I have already created a backup of master branch as release 1.0 like this
git checkout master
git checkout -b release_1
Assuming these are private branches (i.e. nobody else is working on them), you can just set master
to experiment
like this:
git checkout master
git reset --hard experiment
If these are public branches, you'll probably want to merge and resolve conflicts, as Jefromi explains.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With