Neither the GPL nor the FLD allow you to relicense the covered works under MIT or BSD. You have to keep the respective licenses. Furthermore, the FDL allows no relicensing at all (aside from a historic clause that was only usable by Wikipedia). In particular, you cannot relicense FDL works as GPL. Because of this incompatibility, the FDL encourages but does not enforce included code samples to be dual-licensed.
You can always perform any relicensing if all copyright holders of that work agree to the relicensing. This tends to be impractical as copyright holders may be unknown, unreachable, or even dead.
It is not a problem if a repository contains works side by side that are subject to different licenses, as long as they do not form a single combined work. For distributing the repository, you will have to comply with all licenses independently. Fortunately, verbatim copies of the source forms are allowed by all open source licenses incl. GPL and FDL:
2. Verbatim Copying
You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License.
For that reason, you also don't have to purge any trace of FDL code from the Git history if you remove that code. The Git history will still include FDL-licensed parts, but this doesn't affect the up to date works in the repository.
However, if you changed the FDL licensed works, you must only do so in compliance with the license. For example, you must amend or add a “History” section with “an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page”.