Introduction
This guide will help beginners upload a Laravel project to GitHub. By the end, your project will be online, safely stored, and ready for sharing.
Step 1: Create a GitHub Repository
-
Go to GitHub and log in.
-
Click + → New Repository.
-
Fill in:
-
Repository name (e.g.,
Laravel-Project) -
Visibility: Public or Private
-
-
Do not check “Initialize with README”.
-
Click Create repository.
Step 2: Open Terminal and Go to Your Project
Step 3: Initialize Git
Step 4: Stage and Commit Files
Step 5: Rename Branch to main (Optional)
Check branch:
Rename if needed:
Step 6: Add GitHub Remote
Check if origin exists:
-
If it exists and is wrong:
-
If it doesn’t exist:
Step 7: Pull Remote Changes (if needed)
If GitHub has a README or other files:
Resolve conflicts if any, then commit.
Step 8: Push to GitHub
-usetsmainas default for future pushes.
Step 9: Check Your Repository
Go to:
You should see your Laravel project online.
Step 10: Optional – Add README.md
✅ Done! Your Laravel project is now on GitHub.

