GitHub Repository Creation Requirements (GitFlow Compatible)
Intended Use
- When standardizing GitHub repository creation procedures across teams
- When adopting GitFlow branching strategy
- When referring to guidelines for initial repository setup
Requirements Specification Content
1. Purpose
This document defines the requirements for the process of initializing a working folder with git and creating a public repository on GitHub using a user-specified repository name, owner name, and optional image URL. It also manages branches following the GitFlow branching strategy.
2. Prerequisites
- GitHub CLI installed
- GitHub account created
- Git installed in local environment
3. Input Parameters
- Repository name (user-specified)
- Owner name (user-specified)
- Repository image URL (optional, user-specified)
4. Process Steps
4.1 Create and Initialize Working Folder
- Create a new folder with the specified repository name
- Navigate to the created folder
- Initialize as a Git repository with
git initcommand
4.2 Create GitHub Repository
- Create a public repository on GitHub using
gh repo createcommand
gh repo create owner-name/repository-name --public4.3 Configure Remote Repository
- Add the created GitHub repository as a remote
git remote add origin https://github.com/owner-name/repository-name.git4.4 Configure Branches (GitFlow)
- Set main branch to
main
git branch -M main- Create
developbranch for development
git branch develop4.5 Create Initial Commit
- Create README.md file
- Create
.gitignorefile (as needed) - Stage changes and create initial commit
git add .
git commit -m "Initial commit"4.6 Push to Remote Repository
- Push initial commit to
mainbranch
git push -u origin main- Push
developbranch
git checkout develop
git push -u origin develop5. Repository Format
Format repository structure and README.md file referring to the following URL:
https://raw.githubusercontent.com/Sunwood-ai-labs/HarmonAI_II/refs/heads/main/README.mdMain elements:
- Project name
- Brief description
- Installation instructions
- Usage instructions
- Contribution guidelines
- License information
Image display: If an image URL is specified, display it centered at the top of the README.md file as follows:
<p align="center">
<img src="imageURL" alt="repository image">
</p>6. Output
- Git repository initialized locally
- Public repository created on GitHub
- Remote repository with initial commit pushed (
mainanddevelopbranches)
7. Error Handling
When an error occurs at any step, display appropriate error messages and suggest recovery procedures when possible
8. Security Considerations
Add sensitive information (API keys, etc.) to .gitignore file and avoid committing to repository
9. Extensibility
Design to allow implementation of additional features in the future, such as template selection and branch protection rule configuration
10. GitFlow Branching Strategy
Use the following branches following GitFlow:
main: Stable branch for product releasesdevelop: Development branchfeature/*: Branches for new feature developmentrelease/*: Branches for release preparationhotfix/*: Branches for emergency bug fixes
Share usage methods and operational rules for each branch within the team to maintain consistency.
Notes
- This document is a requirements specification, not an executable prompt
- For actual repository creation, use the "GitHub Repository Initialization" prompt
- GitHub CLI (
gh) installation is a prerequisite