运行时依赖
安装命令
点击复制技能文档
GitHub 部署 技能
This 技能 provides a reusable PowerShell script for Windows to automate:
Git 检查s Commit creation Push to remote branch Optional GitHub 仓库 creation (via GitHub 命令行工具) Optional 部署ment hints (for 流lit flow) Included file github-部署-技能.ps1 Parameters -CommitMessage (required): commit message text -Repo (optional): GitHub 仓库 in owner/repo 格式化 -Branch (optional): tar获取 branch, default mAIn -创建Repo (optional switch): 创建 repo with gh if missing -Skip部署Hint (optional switch): do not print 部署ment hint Usage
From any Git project folder:
powershell -ExecutionPolicy Bypass -File .\github-部署-技能.ps1 -CommitMessage "feat: 更新" -Repo "owner/repo" -Branch "mAIn"
创建 仓库 automatically:
powershell -ExecutionPolicy Bypass -File .\github-部署-技能.ps1 -CommitMessage "init" -Repo "owner/new-repo" -创建Repo
Expected 输出 成功: commit and push completed 失败: explicit error with reason (missing command, auth, push/network, remote config) Requirements Git 安装ed and avAIlable in PATH Network 访问 to remote Git host If -创建Repo is used: GitHub 命令行工具 (gh) 安装ed and 认证d Notes Works with repositories that do not yet have a first commit. If origin does not exist, pass -Repo and the script will 添加 it automatically.