Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Can't pull student repos

Abierto
#77 6 comentarios 6 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
git, go
Área
cli

Línea de trabajo

Reproduce el fallo con gh classroom clone student-repos seguido de gh classroom pull student-repos, usando la salida de depuración proporcionada como referencia. Empieza rastreando el flujo de pull alrededor de git fetch upstream refs/heads/master y git merge-base --is-ancestor; se considera terminado cuando los repositorios se actualicen correctamente y los repositorios sin cambios ya no informen de cambios divergentes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug

I cannot pull updates in students assignment using gh classroom pull student-repos -a ... command. It says:

failed to run gh: can't sync because there are diverging changes; use `--force` to overwrite the destination branch
. error: exit status 1

however, there are no diverging changes. It also does not work when there are no updates, as shown here:

$ gh classroom clone student-repos
? Select a classroom: XXXX
? Select an assignment: YYYY
Creating directory:  /ZZZZ-submissions
Cloning into: /ZZZZ-submissions/ZZZ-AAA
Cloning into: /ZZZZ-submissions/ZZZ-BBB
Cloned 2 repos.
 
$ gh classroom pull student-repos
? Select a classroom: XXXX
? Select an assignment: YYYY
Pulling repo: /ZZZZ-submissions/ZZZ-AAA
failed to run gh: can't sync because there are diverging changes; use `--force` to overwrite the destination branch
. error: exit status 1
Pulling repo: /ZZZZ-submissions/ZZZ-BBBB
failed to run gh: can't sync because there are diverging changes; use `--force` to overwrite the destination branch
. error: exit status 1
$ gh --version
gh version 2.52.0 (2024-07-15)
https://github.com/cli/cli/releases/tag/v2.52.0
$ gh extension list
NAME          REPO                 VERSION
gh act        nektos/gh-act        v0.2.55
gh classroom  github/gh-classroom  v0.1.14
Steps to reproduce the behavior
  1. Clone students repositories using gh classroom clone ....
  2. (Optional) Modify the reference repository and request Pull Request, accept it.
  3. Try to pull repository again
Expected vs actual behaviour

I would expect all repositories to be updated. Now I need to update them manually, which works ok (no diverging changes).

Logs

Paste the activity from your command line. Redact if needed.

$GH_DEBUG=true gh classroom pull student-repos -a AAAAAA
* Request at 2024-07-23 13:35:52.177507471 +0200 CEST m=+0.028484741
* Request to https://api.github.com/assignments/AAAAAA
* Request took 414.42728ms
Pulling repo: XXXXXX
failed to run gh: [git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
* Request at 2024-07-23 13:35:52.616066256 +0200 CEST m=+0.020500993
* Request to https://api.github.com/graphql
* Request took 295.087327ms
[git -c credential.helper= -c credential.helper=!"/usr/bin/gh" auth git-credential fetch -q upstream refs/heads/master]
[git rev-parse --verify refs/heads/master]
[git merge-base --is-ancestor master FETCH_HEAD]
can't sync because there are diverging changes; use `--force` to overwrite the destination branch
. error: exit status 1

The command was executed in the same directory where gh classroom clone student-repos --all was executed before.

Lenguaje dominante
Go
Estrellas
126
Forks
21
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/gh-classroom

Todos los issues de github/gh-classroom

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.