Git Support is Coming to the Laravel Installer
Published on by Paul Redmond
The Laravel installer is getting a new feature that allows you to immediately set up a Git repository with a fresh Laravel app, and even push it to GitHub:
Coming soon to the @laravelphp installer: Git Support!— Dries Vints (@driesvints) March 1, 2021
Set up a fresh Git repository with the skeleton already committed. Additionally, push that Git repository to GitHub. Start immediately with committing and pushing changes to your new Laravel app ✨https://t.co/CJ2VFiLZXl
Here are some examples of what the new install options will look like (taken from the PR description) once this feature is available:
# Create a fresh Laravel app and `git init + commit`laravel new my-app.com --git# Same as above, but also create a private GitHub repolaravel new my-app.com --github# Same as above, but will commit Jetstream separatelylaravel new my-app.com --jet --github# Pass some custom flags to the underlying `gh` commandlaravel new my-app.com --github="--public --team laravel"
As you can see above, the installer uses the GitHub CLI to create a private GitHub repository based on your configuration settings. You'll need to set up the
gh CLI first to use the
At the time of writing, this feature is still under review but should be available soon. You can follow along and see the source code behind this feature in laravel/installer PR #185. A massive shout-out to Dries Vints for submitting this feature request!
Also, check out our article about updating the Laravel installer to stay up-to-date with the latest installer features.