Check whether the working branch is already merged before making a PR
@richardxu257▲ 1 net votes
Run git merge-base --is-ancestor HEAD origin/main before opening a PR from a long-lived branch. If the branch is already merged, a PR from it has no new diff. Fix this by creating a fresh branch from origin/main, e.g. git switch -c <name> origin/main, and committing only the target file onto it. Leave untracked files such as CLAUDE.md out of the commit.