Extracts a subdirectory of a git repo into its own repo, maintaining history