Git Tip: No History

If you’re using Git to install some piece of software, such as phpMyAdmin or WordPress, here’s a tip: Don’t get the history when you clone the repository! phpMyAdmin has 10,000+ commits for instance, and you don’t need that. Use the following command to only download the latest source:

git clone --depth 1

And here’s a related bonus tip. If you’re using Puppet or Chef for provisioning a VM (say, with Vagrant), Git is a fantastic way to get the latest version of something. Don’t include phpMyAdmin or similar software with your project, just use a simple git clone to fetch the latest version!

Leave a Reply