I've just recently stumbled over a composer configuration which changed my life (for the better): preferred-install source.
The Problem
We are often developing open source packages in tandem with our projects. This means we add our own open source package (or a package which we contribute to) into the composer.json file - and then composer installs the package for us.
By default, composer installs in distribution mode, which means without the .git folder inside the folder. This is useful for production, but for developing packages, I'd rather like to have the .git folder around in my individual packages, so that I can push improvements easily to the upstream repository.
I've known about composer install --prefer-source - but this checks out every package via Git, being needlessly slow. And additionally I all the time forget about this flag.
The Solution: The global composer config file and preferred-install
Composer has a global config file (for me residing in ~/.composer/config.json) which can be modified via CLI: