Remove .git folder when install library via composer

Use –prefer-dist

composer require "phpoffice/phpexcel" --prefer-dist

For previous install that download .git, and committed to local repository (in which the folder that contains .git is not committed), re-run it as the flow below.
1. composer remove the package.
2. git commit (commit the removing)
3. composer require the package again, with –prefer-dist
4. git commit (commit the re-installed source)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: