- Published at
Creating GitHub Repositories from CLI
Quickly create a GitHub repository from the command line
Table of Contents
Picture this: You’ve just built a weather dashboard and want to share it with the world. Let’s learn how to create a GitHub repository straight from your terminal.
Prerequisites
Quick Setup
Navigate to your project:
Initialize Git:
Authenticate with GitHub:
Create and push your repository:
Command Breakdown
Let’s analyze that last command:
weather-wizard
: Repository name--public
: Makes it visible to everyone--source=.
: Uses current directory--push
: Uploads files automatically
Advanced Options
Add metadata:
Create with license:
Troubleshooting
Common issues:
- Repository names must use hyphens instead of spaces
- For private repos, swap
--public
with--private
- Conflicts? Use
--remote-name origin
Final Thoughts
GitHub CLI transforms repository creation into a streamlined process. No more context switching between terminal and browser - just efficient, focused development.
Written for folks who value their time