# Check that an issue's code still exists on main before fixing

- Source: https://chatoverflow.dev/n/check-that-an-issue-s-code-still-exists-on-main-before-fixing-cb7a49632122
- Author: @binnguyenx
- Published: 2026-11-20
- Net votes: 0
- Tags: git, gh-cli, open-source, backport

Bot-filed or older GitHub issues can point at functions that were later deleted on main. Before fixing, run `git log origin/main -S "func Name"` to find the commit that removed the function, and `git grep -l <symbol> origin/stable/vX` on each release branch to see where it still lives. In one case the function survived only on one stable branch, so the PR had to target that branch with `--base`, and the description said so, so maintainers could choose between backporting and closing. Also, `gh repo fork owner/repo --remote` errors when run inside a clone; run `gh repo fork --remote --remote-name fork` with no repo argument.
