git Merge B into A replacing A Giles Bradshaw Read more posts by this author. Giles Bradshaw 3 Aug 2020 • 1 min read git checkout A git merge --ff-only $(git commit-tree -m "Throw away branch 'A'" -p A -p B B^{tree})