only checkout a repo's original branch at the end

was being reset prematurely, making the submodule commit have nothing to
commit