Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[gh classroom clone --mirror] Clone repositories using mirror behavior to have all branches locally

オープン
#76 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
git, github, go
領域
cli

調査の方向性

既存の gh classroom clone コマンドから始め、その clone フラグの処理を、文書化されている gh repo clone ... -- --depth=1 の動作と比較してください。要求されている --mirror オプションが学生のリポジトリに対して git clone --mirror と同等の結果を生成し、すべてのブランチをローカルに保持することを確認してください。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Is your feature request related to a problem? Please describe.
When cloning student-repos repositories for archives purpose it is necessary to get all the branches locally so that the content on Github can be removed safely.
Similarly if the assignment tolerate or require to provide multiple branches then it would benefit of having all branches locally when cloning repositories instead of pulling them afterwards from remote repository.

Describe the solution you'd like
When using the existing gh classroom clone command the possibility to add --mirror option which would reflect the usage of git clone --mirror https://git-scm.com/docs/git-clone#Documentation/git-clone.txt-code--mirrorcode

Describe alternatives you've considered
Scripting outside of gh cli using git directly to clone the repositories.

Additional context

Given that the underlying gh cli support adding git flags on the command line for clone operation it could be resolved by exposing this feature in gh-classroom cli. This solution would also resolves https://github.com/github/gh-classroom/issues/15

https://cli.github.com/manual/gh_repo_clone

# Clone a repository with additional git clone flags
$ gh repo clone cli/cli -- --depth=1
主要言語
Go
スター
126
フォーク
21
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/gh-classroom のほかの issue

github/gh-classroom の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。