Create Repository
Create a new GitHub repository with scaffolding and staging branch.
Input
Repository name: $ARGUMENTS
If no name provided, ask the user for a repository name.
Steps
1. Create Project Directory
bash
mkdir -p projects/$ARGUMENTS cd projects/$ARGUMENTS
2. Initialize Git
bash
git init git branch -M main
3. Create Initial Files
- •Create
README.mdwith the project name and a placeholder description - •Create
.gitignoreappropriate for the expected tech stack (detect from context or ask) - •Ensure
.gitignoreincludesstate/,node_modules/,__pycache__/,.env
4. Initial Commit
bash
git add -A git commit -m "Initial commit"
5. Create GitHub Repository
bash
gh repo create $ARGUMENTS --private --source . --push
6. Create Staging Branch
bash
git checkout -b staging git push -u origin staging
7. Return to Main
bash
git checkout main
Output
Report the GitHub repository URL and confirm both main and staging branches exist.