psst
it's fine to have a fucked up git history, you can always clean it up afterwards, basically redo just the history, once you're happy with the code
they don't want you to know that but you can just trash the history and redo the commits with
git reset --soft <<hash>>i do that all the time