git-fork-tool
A lightweight CLI for working with Git fork repositories.
Currently supports GitCode and GitHub.
Usage
Set an access token:
export GC_TOKEN=your_token
# or
export GH_TOKEN=your_token
Add the parent repository as upstream:
gft repo init
Check fork sync status:
gft repo sync main --status
Trigger a fork sync:
gft repo sync main
Fetch an upstream pull request into a stable local ref and print that ref:
gft pr fetch 123
Create local branches with git:
git switch -c pr-123-original "$(gft pr fetch 123)"
git switch -c pr-123-experiment "$(gft pr fetch 123)"
Update an existing local branch with git:
ref="$(gft pr fetch 123)"
git switch pr-123-original
git merge --ff-only "$ref"
Rebase local experiment commits onto the latest PR:
ref="$(gft pr fetch 123)"
git switch pr-123-experiment
git rebase "$ref"
Reset a local branch to the latest PR:
ref="$(gft pr fetch 123)"
git switch pr-123-original
git reset --hard "$ref"
Print the ref or refspec without fetching:
gft pr ref 123
gft pr refspec 123
gft pr fetch and gft pr refspec detect the platform from the remote URL.
Notes
GITCODE_TOKENcan be used instead ofGC_TOKEN.GITHUB_TOKENcan be used instead ofGH_TOKEN.- GitHub PR refs use
refs/pull/<number>/head; GitCode MR refs userefs/merge-requests/<number>/head. - For GitHub,
--statususes the compare API. - Triggering GitHub sync requires contents write permission.
Metadata
Release files for git-fork-tool 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| git_fork_tool-0.0.2.tar.gz | 12.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_fork_tool-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.7 kB
Release files / git_fork_tool-0.0.2.tar.gz
| Download URL | git_fork_tool-0.0.2.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb58871f4e3f3a8bc1e24fea4d0db2992346423da6a80a220bdd775b53a41384
|
|
BLAKE2b-256 checksum How to use checksums |
76681de36aca49068dd763ff1cf9301f19924ca34a47512a5bef6404ba623523
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / git_fork_tool-0.0.2-py3-none-any.whl
| Download URL | git_fork_tool-0.0.2-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8230e5b8e45ad426e6edcf32275f8155c9c6d0d7f71c1b303fbf95ad716eaffb
|
|
BLAKE2b-256 checksum How to use checksums |
c926ff1a7d60994788fba4b544449c9809151a30a094d25f8b6252d7a3161127
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for git-fork-tool 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.