Method 1: Create Repository via Website
Step 1: Login
- Go to https://github.com
- Sign in to your account
Step 2: Create New Repository
- Click “+” (top right corner)
- Select “New repository”
Step 3: Enter Details
- Repository Name (e.g.,
my-project) - Description (optional)
- Choose:
- Public (visible to everyone)
- Private (only you/team)
Step 4: Initialize Repository
(Optional but recommended)
- ✅ Add README file
- ✅ Add .gitignore
- ✅ Choose a license
Step 5: Click Create
- Click “Create repository”
➡ Your repository is ready 🎉
🔹 Method 2: Create Repository Using Git (Command Line)
Step 1: Initialize Project
git init
Step 2: Add Files
git add .
Step 3: Commit Changes
git commit -m "Initial commit"
Step 4: Connect to GitHub
git remote add origin https://github.com/username/repo-name.git
Step 5: Push Code
git push -u origin main
🔹 Important Files
- README.md → Project description
- .gitignore → Ignore unwanted files
- LICENSE → Legal usage terms
🔹 Tips
- Use meaningful repository names
- Write a clear README
- Keep commits organized
