github / github/gh-classroom

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

Offen
#92 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Go
Sterne
125
Forks
21
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die Implementierung und das Parsen der Argumente für `gh classroom pull student-repos` nachzuverfolgen, und ermittle anschließend, wie das aktuelle Pull-Verhalten origin und upstream berücksichtigt. Definiere die neue Form `-o` und überprüfe, dass sie das Äquivalent von `git pull origin main` ausführt, ohne eine Synchronisierung mit upstream zu erfordern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, github, go
Bereich
cli
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.