You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Backport action fails with "couldn't find remote ref" on existing branches #12809
Applying a backport <branch> label sometimes makes the backport workflow fail with:
Backport failed for `2026.02.xx`: couldn't find remote ref `2026.02.xx`.
Please ensure that this GitHub repo has a branch named `2026.02.xx`.
even though the target branch exists.
Actual error
The message is misleading. korthout/backport-action reports it for any failure of the git fetch of the target branch. The real error in the run log is:
[command]/usr/bin/git fetch --depth=1 origin 2026.02.xx
fatal: shallow file has changed since we read it
Cause
.github/workflows/backport.yml checks out with the default fetch-depth: 1, so the working copy is a shallow clone. The action then performs its own shallow fetches, which rewrite .git/shallow:
Activity