For whatever reason "d-i preseed/late_command string in-target git clone https://github.com/adrelanos/Whonix", like Eero suggested, doesn't work. No folder is created.
I did find the solution though. You need to set the target directory and it works then. d-i preseed/late_command string in-target git clone https://github.com/project /root/project The directory needs to be defined. If not, like with the option below, it won't work. d-i preseed/late_command string in-target git clone https://github.com/project /root