[New Command Request] Add an option to pull from origin only, ignoring upstream
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start by tracing the implementation and argument parsing for gh classroom pull student-repos, then identify how its current pull behavior considers origin and upstream. Define the new -o form and verify that it performs the equivalent of git pull origin main without requiring upstream synchronization.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 126
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/gh-classroom
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
github/gh-classroom#95 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/gh-classroom#21 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
github/gh-classroom#116 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
github/gh-classroom#110 ·
-
Sanitize Team name Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
github/gh-classroom#109 ·
All issues in github/gh-classroom
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
googleapis/librarian#7670 · 2 comments ·