Here’s the lowdown on kickin’ off your Laravel project, syncing up with GitHub, and pushin’ your code up to the cloud, all while soaking up that chill Cali vibe.
Spin Up a New Laravel Project
Hey, ready to lay the groundwork? Fire up the terminal and get those commands rollin’. Create a new directory, jump in, and let Composer work its magic to set up Laravel.
#mkdir blog
#cd blog
#composer create-project laravel/laravel .
Forge Your SSH Key & Personal Access Tokens
Whether you’re ridin’ the waves with SSH or cruising down the HTTPS highway for pushin’ git branches, you’ve got options, dude.
For the SSH route, catch the official wave here:
Generating a New SSH Key
Hitting a wipeout? Debug SSH with this:
SSH Troubleshooting
Catch these vids for a visual on SSH keys and HTTPS tokens:
Manage Repos Like a Pro
Next up, surf on over to GitHub, web or CLI, and create a new repo to house your project.
Scope out this screenshot for how it looks:
Then, roll with these steps to get your repo up using the SSH GitHub vibes:
…or create a new repository on the command line
“`html
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:TjoBiZ/blog-example.git
git push -u origin main
“`
…or push an existing repository from the command line
“`html
git remote add origin git@github.com:TjoBiZ/blog-example.git
git branch -M main
git push -u origin main
“`
Rollin’ with a personal token instead? Swap in this HTTPS remote origin link:
git remote add origin https://github.com/TjoBiZ/blog-example.git
There you have it! Whether you’re coding to the rhythm of the crashing waves or the quiet hum of a coffee shop, these Git commands will keep your projects surf-ready and steady as she goes. Keep it real, keep it coded.