diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php
index 99646ba13..00bb21094 100644
--- a/src/Composer/Command/CreateProjectCommand.php
+++ b/src/Composer/Command/CreateProjectCommand.php
@@ -169,6 +169,7 @@ EOT
if ($package->getRepository() instanceof NotifiableRepositoryInterface) {
$package->getRepository()->notifyInstall($package);
}
+ $installedFromVcs = 'source' === $package->getInstallationSource();
$io->write('Created project in ' . $directory . '');
chdir($directory);
@@ -197,6 +198,7 @@ EOT
!$io->isInteractive() ||
$io->askConfirmation('Do you want to remove the exisitng VCS (.git, .svn..) history? [Y,n]? ', true)
)
+ && (!$preferDist || $installedFromVcs)
) {
$finder = new Finder();
$finder->depth(1)->directories()->in(getcwd())->ignoreVCS(false)->ignoreDotFiles(false);