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

git: cherry-pick, rebase and pull --rebase

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

Maintainer thường phản hồi trong vòng 1 ngày

@aron-cf đang làm issue này rồi.

Từ ngày 6/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement

docs/13_git_interface.md lists cherry-pick and revert as "out of scope until a concrete caller needs them." Here is one.

Use case

A long-lived checkout on a shared branch, with local commits that are not pushed yet, while other clients push to the same branch. Catching up with merge or pull adds a merge commit every time and makes the history non-linear. What a developer does here is git pull --rebase: the local commits exist nowhere else, so replaying them on top of the upstream rewrites nothing shared, and the history stays linear.

Ask
  1. cherryPick on the client, and git cherry-pick <oid> in the shell. isomorphic-git already ships cherryPick (a three-way merge against the commit's own parent, applied to the working tree), so this is a wrapper in the shape of merge.
  2. rebase on the client, with git rebase <upstream> and git pull --rebase in the shell: reset the branch to the upstream and cherry-pick upstream..HEAD oldest first, stopping on a conflict with the paths reported as merge reports them. --autostash would be welcome, since stash is already there.
  3. revert, if you want to close the set.
Related

isomorphic-git's merge writes the merged tree and the commit and moves the branch, but on a clean merge it does not update the working directory; only pull runs a checkout afterwards. Through the client, a clean merge therefore leaves every file it changed reading as a local modification back to the old content. Worth a line in the docs.

Environment

@cloudflare/computer 0.3.0 (pkg.pr.new build 9184be3), isomorphic-git 1.38, Workers runtime.

Ngôn ngữ chính
TypeScript
Star
9.5k
Fork
552
Merge trung bình
1 ngày 21 giờ
Pull request đã merge (30 ngày)
42

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 khác của cloudflare/computer

Tất cả issue của cloudflare/computer

Issue tương tự

Thêm issue về TypeScript

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.