github / github/gh-classroom

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

Aperta
#92 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Go
Stelle
125
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia tracciando l’implementazione e l’analisi degli argomenti di `gh classroom pull student-repos`, quindi identifica come il comportamento attuale di pull considera origin e upstream. Definisci la nuova forma `-o` e verifica che esegua l’equivalente di `git pull origin main` senza richiedere la sincronizzazione con upstream.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, github, go
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.