Make a branch new master
When cleaning up old repositories, perhaps migrated from SVN or the like - everything is screwed up - do not dispair, git can fix this.
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