Skip to content

提交PR的实践 #1

Description

@qingminglong

1、克隆CLI-Anything

git clone https://github.com/HKUDS/CLI-Anything.git

2、切换分支

git checkout main

3、Fork CLI-Anything

4、origin 指向上游

1、获取Fork的URL地址

2、执行指令

# 1. 把现在的「上游」改名为 upstream(名字习惯如此,可不改逻辑)
git remote rename origin upstream
# 2. 把你的 Fork 加为 origin(URL 换成你 Fork 后的地址)
git remote add origin https://github.com/qingminglong/CLI-Anything-Fork.git
# 3. 确认
git remote -v

期望大致是:
origin → 你的 Fork(你的用户名/CLI-Anything)
upstream → 原仓库(HKUDS/CLI-Anything)

5、推送分支

git checkout main
git fetch upstream
git merge upstream/main
git checkout -b fix/issue-217
git push -u origin fix/issue-217

6、开 PR 指向上游

若刚 push 过分支,GitHub 常会显示 Compare & pull request,点击底部New pull request
HKUDS/CLI-Anything#218

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions