Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[New Command Request] Add an option to pull from origin only, ignoring upstream

Open
#92 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
git, github, go
Domain
cli

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

enhancement

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-classroom

All issues in github/gh-classroom

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.