git checkout better_branch
git merge --strategy=ours master # keep the content of this branch, but record a merge
git checkout master
git merge better_branch # fast-forward master up to the merge
Resources
- https://stackoverflow.com/questions/2763006/make-the-current-git-branch-a-master-branch
- https://www.atlassian.com/git/tutorials/using-branches/merge-strategy
- https://stackabuse.com/git-merge-branch-into-master/
- https://git-scm.com/docs/git-merge
Git: Make branch become the master