Scott Robinson Technical Lead

Quickly Start New Projects From Git Repo

Found this piece of code a while ago which is useful if you want to start projects from a skeleton repo or similar starting point.

mkdir new-laravel-project
cd new-laravel-project
git init
git fetch --depth=1 -n https://github.com/laravel/laravel
git reset --hard $(git commit-tree FETCH_HEAD^{tree} -m "Initial Commit")

Found this useful? Everything here is free and stays that way. If it saved you an afternoon, you can buy me a coffee.