init-git: wait for commands to end before getting further