Cherry-pick commits across GitHub repositories using only the GitHub API - no local clone required
Project description
GitHub cherry-pick
Cherry-pick commits across GitHub repositories using only the GitHub API - no local clone required.
How it works
Uses the algorithm described by Jim's Stack Overflow answer to perform a cherry-pick entirely through the GitHub REST API:
Installation
Requires Python 3.10+, I recommend using uv, but it will work fine with pip or anything else.
uv tool install gh-cherry-pick
Or run directly without installing:
uvx gh-cherry-pick --help
Usage
gh-cherry-pick --target OWNER/REPO@BRANCH COMMITS...
Arguments:
| Argument | Format | Description |
|---|---|---|
--target |
Owner/RepoName@branch |
Target repository and branch to apply the cherry-picks to |
COMMITS |
Owner/RepoName/sha |
One or more commits to cherry-pick (short or full SHA) |
--token, -t |
string | GitHub token (falls back to $GITHUB_TOKEN) |
Example:
GITHUB_TOKEN=ghp_... gh-cherry-pick \
--target MyOrg/nixpkgs@patched \
NixOS/nixpkgs/3f5ba52cc4701bf341457dfe5f6cb58e0cbb7f83 \
NixOS/nixpkgs/49ba75edefc8dc4fee45482f77a280ddd7121797
Multiple commits are applied in order, each building on the previous result.
Development
uv sync
uv run pre-commit install
Then commit your changes and send a pull request!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gh_cherry_pick-1.1.1.tar.gz.
File metadata
- Download URL: gh_cherry_pick-1.1.1.tar.gz
- Upload date:
- Size: 61.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4ba3f192b10df0ec722d33e69b418cf7a280752f28967243825760ea2e953bb
|
|
| MD5 |
9e360bb80986c10b5cf6e1fc0cd88005
|
|
| BLAKE2b-256 |
0113adf05449275adfadd80c96088ed23e8c691f1a06dfcf96eaaa1b8d7bf105
|
Provenance
The following attestation bundles were made for gh_cherry_pick-1.1.1.tar.gz:
Publisher:
publish.yml on PerchunPak/gh-cherry-pick
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_cherry_pick-1.1.1.tar.gz -
Subject digest:
f4ba3f192b10df0ec722d33e69b418cf7a280752f28967243825760ea2e953bb - Sigstore transparency entry: 1158694147
- Sigstore integration time:
-
Permalink:
PerchunPak/gh-cherry-pick@e8dfca1356f637a8587fdd5e1fa315704bac9fc7 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/PerchunPak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e8dfca1356f637a8587fdd5e1fa315704bac9fc7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gh_cherry_pick-1.1.1-py3-none-any.whl.
File metadata
- Download URL: gh_cherry_pick-1.1.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bef0b31a43ae9ff25828156634740be49b8d1f2319b05936d8ac15bae2db2e96
|
|
| MD5 |
00f0f6c4f8ed76c580356b6e89fe7cdf
|
|
| BLAKE2b-256 |
b7fe9090bfa42b8e1f877e65bfa15bfee8abacb968cf86d6e94a549a6955cf63
|
Provenance
The following attestation bundles were made for gh_cherry_pick-1.1.1-py3-none-any.whl:
Publisher:
publish.yml on PerchunPak/gh-cherry-pick
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_cherry_pick-1.1.1-py3-none-any.whl -
Subject digest:
bef0b31a43ae9ff25828156634740be49b8d1f2319b05936d8ac15bae2db2e96 - Sigstore transparency entry: 1158694185
- Sigstore integration time:
-
Permalink:
PerchunPak/gh-cherry-pick@e8dfca1356f637a8587fdd5e1fa315704bac9fc7 -
Branch / Tag:
refs/tags/v1.1.1 - Owner: https://github.com/PerchunPak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e8dfca1356f637a8587fdd5e1fa315704bac9fc7 -
Trigger Event:
push
-
Statement type: