Creating_and_Managing_GitHub_Repos
Creating and Managing GitHub Repos
Create and configure repositories on GitHub.
➕ Create Repository
Create via CLI
gh repo create my-project --public
Creates public repository.
Create Private
gh repo create my-project --private
Creates private repository.
Create with Description
gh repo create my-project --description "Project description" --public
Creates repo with description.
Create with Clone
gh repo create my-project --public --clone
Creates and clones locally.
Create from Template
gh repo create my-project --template owner/template-repo
Creates from template repository.
Create in Organization
gh repo create my-org/my-project --public
Creates repo in organization.
📋 View Repositories
List Your Repos
gh repo list
Shows your repositories.
List with Details
gh repo list --limit 50
Lists up to 50 repos.
View Repo Info
gh repo view owner/repo
Shows repository details.
View in Browser
gh repo view --web
Opens current repo in browser.
✏️ Edit Repository
Edit Description
gh repo edit --description "New description"
Updates repo description.
Edit Homepage
gh repo edit --homepage "https://example.com"
Sets repository homepage.
Change Visibility
gh repo edit --visibility private
Makes repository private.
Enable/Disable Features
gh repo edit --enable-wiki=false
Disables wiki.
gh repo edit --enable-issues=true
Enables issues.
🔄 Clone/Fork
Clone Repository
gh repo clone owner/repo
Clones to local machine.
Fork Repository
gh repo fork owner/repo
Creates fork on your account.
Fork and Clone
gh repo fork owner/repo --clone
Forks and clones.
🔧 Repository Settings
Rename Repo
gh repo rename new-name
Renames repository.
Archive Repo
gh repo archive owner/repo
Archives repository (read-only).
Delete Repo
gh repo delete owner/repo --yes
⚠️ Permanently deletes repository.
📁 Topics/Tags
Add Topics
gh api repos/{owner}/{repo}/topics -X PUT \
-H "Accept: application/vnd.github.v3+json" \
-f names='["javascript","react","frontend"]'
Adds topics to repository.
💡 Tips
Initialize with Files
Use --gitignore node and --license mit when creating.
Template Repos
Mark repo as template in settings for quick project starts.
🔗 Related
#github #repo #create #manage