Opened 44 hours ago
Last modified 31 hours ago
#65540 new defect (bug)
Documentation: Correct `git pull` command for syncing with upstream
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | has-screenshots has-patch has-test-info |
| Focuses: | Cc: |
Description
While setting up the WordPress development environment for the first time, I followed the documentation step by step.
I forked the wordpress-develop repository, cloned my fork locally, and added the official WordPress repository as the upstream remote.
When I reached the section describing how to synchronize my local repository with upstream, I ran the documented command:
git pull --ff upstream/trunk
Git returned the following error:
fatal: 'upstream/trunk' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
After troubleshooting, I found that git pull expects the remote name and branch name as separate arguments. The following command works correctly:
git pull --ff upstream trunk
Proposed change
Replace:
git pull --ff upstream/trunk
with:
git pull --ff upstream trunk
This small documentation change would help first-time contributors avoid this confusing error during their initial setup.
I'll attach a screenshot of the error for reference.
Attachments (2)
Change History (6)
#1
@
44 hours ago
- Component changed from Text Changes to Build/Test Tools
- Version trunk deleted
Thanks for the issue.
Can you open PR with the changes you want to propose?
This ticket was mentioned in PR #12318 on WordPress/wordpress-develop by @mkrndmane.
44 hours ago
#2
- Keywords has-patch added
Fix the documented git pull command used for syncing with the upstream repository.
The README currently shows:
git pull --ff upstream/trunk
This PR updates it to:
git pull --ff upstream trunk
This matches Git's expected syntax (git pull <remote> <branch>) and avoids the fatal error encountered during the initial repository setup.
Trac ticket: https://core.trac.wordpress.org/attachment/ticket/65540/
## Use of AI Tools
AI assistance: Yes
Tool(s): ChatGPT
Model(s): GPT-5.5
Used for: Assisted in drafting the Trac ticket and Pull Request description. I verified the issue, tested the command locally, and prepared the final documentation change myself.
#4
@
31 hours ago
- Keywords has-test-info added; needs-testing removed
Patch testing report
Patch / PR tested
- https://github.com/WordPress/wordpress-develop/pull/12318
- trunk @ 87a5738363 (
README.mdchange reviewed and verified)
Environment
OS: macOS 26.5.1
git: 2.43.0
Local wordpress-develop checkout
Note
This is a documentation-only change (one line in README.md), so it was validated by reproducing the git behaviour directly rather than via the browser/Docker environment.
Steps
- Created a throwaway local repo with an
upstreamremote and atrunkbranch (mirroring the setup described in the README). - Ran the currently-documented command:
git pull --ff upstream/trunk. - Ran the command proposed by the PR:
git pull --ff upstream trunk. - Confirmed the string
upstream/trunkappears only once in README.md.
Results
- Reproduce bug (before): pass —
git pull --ff upstream/trunkfails with the exact error from the ticket:fatal: 'upstream/trunk' does not appear to be a git repository(exit 1). Git treatsupstream/trunkas the repository name. - Apply fix (after): pass —
git pull --ff upstream trunkresolves remoteupstream+ branchtrunkcorrectly and completes successfully (exit 0). - Scope check: pass — diff changes exactly one line;
upstream/trunkoccurs only once in README.md, so no other instance was missed.
Conclusion
PR #12318 corrects the documented sync command from git pull --ff upstream/trunk to git pull --ff upstream trunk, matching Git's git pull <remote> <branch> syntax and eliminating the fatal error first-time contributors hit during setup. The change is minimal, idiomatic, and scoped strictly to the ticket — single line, no behavioural or backward-compatibility impact. Recommend commit.
Documented command fails to execute.