Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#92 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
git, github, go
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu bằng cách truy vết phần triển khai và phân tích đối số của gh classroom pull student-repos, sau đó xác định cách hành vi pull hiện tại xem xét origin và upstream. Xác định dạng mới -o và kiểm tra rằng nó thực hiện tương đương với git pull origin main mà không yêu cầu đồng bộ hóa với upstream.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
126
Fork
21
Merge trung bình
25 ngày 4 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.