These are the steps I did on my way to this question:
How to remove duplicated commits from filter-branch command on git?
My branch A which only has 300 commits is 900 commits behind master. However, the 900 commits that I removed on branch A are duplicates. How can I just make master have 300 commits like branch A?