[New Command Request] Add an option to pull from origin only, ignoring upstream
还没有人认领这个 Issue。
评估
调研方向
首先追踪 gh classroom pull student-repos 的实现和参数解析,然后确定当前的 pull 行为如何考虑 origin 和 upstream。定义新的 -o 形式,并验证它执行的操作等同于 git pull origin main,且不要求与 upstream 同步。
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
see #77
This is to avoid the error message:
failed to run gh: can't sync because there are diverging changes; use `--force` to overwrite the destination branch. error: exit status 1
when student repos aren't in sync with upstream (and may not need to be).
Describe the solution you'd like
As well as the current gh classroom pull student-repos command, a version including the -o flag so the execution is equivalent to git pull origin main instead of the default behaviour (which considers the entire fork chain, i.e. both origin and upstream).
Either:
gh classroom pull -o student-repos
or
gh classroom pull student-repos -o
Describe alternatives you've considered
I've both reverted to my pre-gh classroom scripts and to iterating with a simple shell script through the clones in the x-submissions directory to run git pull origin main.
Additional context
Add any other context or screenshots about the feature request here.
- 主要语言
- Go
- 星标
- 126
- 派生
- 21
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/gh-classroom 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 70/100
github/gh-classroom#95 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
github/gh-classroom#21 ·
-
难度 4/5 3-5 天 新手友好度 35/100
github/gh-classroom#116 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
github/gh-classroom#110 ·
-
难度 3/5 1-2 天 新手友好度 45/100
github/gh-classroom#109 ·
查看 github/gh-classroom 的全部 Issue
相似的 Issue
-
bug github_actions
难度 2/5 1-3 小时 新手友好度 75/100
registrystack/registry-stack#1393 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
JakeChampion/lang#10213 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
oasisprotocol/oasis-sdk#2523 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100