doc: Explain how to fetch commits directly #32774
pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2506-doc-fetch-commit changing 1 files +10 −1-
maflcko commented at 6:28 am on June 19, 2025: memberThis is often needed, and works better than the existing refspec documentation, because even commits that have been force-pushed away can be fetched (as long as they are not garbage collected on the remote).
-
DrahtBot added the label Docs on Jun 19, 2025
-
DrahtBot commented at 6:28 am on June 19, 2025: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32774.
Reviews
See the guideline for information on the review process.
Type Reviewers ACK l0rinc, willcl-ark, Sjors, rkrux, janb84 If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
-
maflcko requested review from rkrux on Jun 19, 2025
-
doc: Explain how to fetch commits directly fa94fd53c9
-
maflcko force-pushed on Jun 19, 2025
-
hebasto commented at 8:40 am on June 19, 2025: memberI use this technique regularly, but I hadn’t realised there was a demand for documenting it.
-
in doc/productivity.md:178 in fa94fd53c9
174+ 175+ 176 ### Reference PRs easily with `refspec`s 177 178-When looking at other's pull requests, it may make sense to add the following section to your `.git/config` file: 179+As an alternative to fetching commits directly, when looking at pull requests by others, it may make sense to add the following section to your `.git/config` file:
willcl-ark commented at 9:06 am on June 19, 2025:I use a different method still to fetch (or update) a single pr from the remote (specifically so that I don’t require yet another 3rd party tool): https://github.com/willcl-ark/nixos-config/blob/fce2bae088d03eaa624affe01f0dbf7dfbfbba91/home/common.nix#L158-L159
I imagine there are countless more ways of doing the same thing, and I think we probably don’t need or want to get into documenting them all here; one is probably fine :)
l0rinc commented at 9:20 am on June 19, 2025:I mentioned it since it’s a different (cli) view of GitHub, not a third party tool.
maflcko commented at 11:00 am on June 19, 2025:I use a different method still to fetch (or update) a single pr from the remote (specifically so that I don’t require yet another 3rd party tool): https://github.com/willcl-ark/nixos-config/blob/fce2bae088d03eaa624affe01f0dbf7dfbfbba91/home/common.nix#L158-L159
Nice. I think this can be put into the next section to offer an alternative that uses less bandwidth/storage. But this can be done in a follow-up.
I mentioned it since it’s a different (cli) view of GitHub, not a third party tool.
Not sure about vendor-specific tooling. Maybe it can be discussed in a follow-up?
l0rinc approvedl0rinc commented at 8:50 am on June 19, 2025: contributorACK fa94fd53c99611e90698dddf81881c302a3aa799
It’s friendlier this way - though GitHub’s cli tool is even more convenient
willcl-ark approvedwillcl-ark commented at 9:24 am on June 19, 2025: memberACK fa94fd53c99611e90698dddf81881c302a3aa799
Seems sensible to document as contributors here frequently review force-pushed branches.
Sjors commented at 9:38 am on June 19, 2025: memberACK fa94fd53c99611e90698dddf81881c302a3aa799
Had to do this a few times when reviewing a range-diff, when my machine didn’t have the previous commit (switching between machines).
rkrux approvedrkrux commented at 9:52 am on June 19, 2025: contributorACK fa94fd53c99611e90698dddf81881c302a3aa799 Thanks for raising the PR quickly.
even commits that have been force-pushed away can be fetched
This is exactly the issue I had faced yesterday.
they are not garbage collected on the remote
I didn’t know the commits were garbage collected on the remote but makes sense.
janb84 commented at 10:35 am on June 19, 2025: contributorACK fa94fd53c99611e90698dddf81881c302a3aa799
This PR adds an explanation how to fetch commits directly, these kind of “small” but helpful tips are very valuable for starting contributors (like me)
fanquake merged this on Jun 19, 2025fanquake closed this on Jun 19, 2025
maflcko deleted the branch on Jun 19, 2025
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-07-08 12:13 UTC
More mirrored repositories can be found on mirror.b10c.me