AgentSkillsCN

julia-github

在 Julia 软件包开发中,借助 Git 和 GitHub CLI 实现版本控制与拉取请求工作流。无论是管理 Git 远程仓库、创建分支,还是处理 PR 请求,都应熟练掌握这一技能。

SKILL.md
--- frontmatter
name: julia-github
description: Use Git and the GitHub CLI for version control and pull request workflows in Julia package development. Use this skill when working with Git remotes, branches, and PRs.

Julia GitHub Workflow

Use Git and the GitHub CLI (gh) for version control and pull request workflows in Julia package development.

Repository Setup

Keep two remotes: upstream (source of truth) and origin (your fork):

bash
git clone https://github.com/YOUR_USERNAME/PackageName.jl.git
cd PackageName.jl
git remote add upstream https://github.com/OriginalOrg/PackageName.jl.git

Daily Workflow

Before Starting Work

bash
git checkout master
git pull upstream master

Creating a Feature Branch

bash
git checkout master
git pull upstream master
git checkout -b descriptive-branch-name

Making Changes

bash
git add file1.jl file2.jl
git commit -m "Add feature X that does Y"
git push -u origin descriptive-branch-name

Creating Pull Requests

bash
gh pr create \
    --title "Your PR Title" \
    --body "Description of changes" \
    --repo OriginalOrg/PackageName.jl

GitHub CLI Quick Reference

TaskCommand
Create PRgh pr create --title "..." --body "..."
List PRsgh pr list
View PRgh pr view 123
Checkout PRgh pr checkout 123
Merge PRgh pr merge 123
List issuesgh issue list
View issuegh issue view 123

Git Quick Reference

TaskCommand
Clonegit clone URL
Pullgit pull origin branch
Pushgit push origin branch
Branchgit checkout -b name
Statusgit status
Diffgit diff
Loggit log --oneline
Stashgit stash / git stash pop

Reference

Related Skills

  • julia-multipackage - Multi-package development workflows
  • julia-package-dev - Package development basics