Opening a PR shows "There isn't anything to compare. main and import are entirely different commit histories." and locally `git merge` says `fatal: refusing to merge unrelated histories`.
IntermediateTroubleshootingGitHub, Actions and Pull Request Issues
Answer
Likely causes → The two branches share no common ancestor: someone ran git init and pushed a new history to the same repo, created the GitHub repo with a README and then pushed an existing local repo, or imported code with a tool that started fresh history.
Diagnose → git merge-base main import || echo "no common ancestor"
Fix → If you really want to combine them:
git switch import
git merge origin/main --allow-unrelated-histories
# resolve conflicts (often README/.gitignore), commit, push, open the PR
If the new history should simply replace the old one, rebase the import commits onto main instead.
Prevent → Create empty GitHub repos (no README/licence) when pushing existing code, or clone first and then add files.
More on GitHub, Actions and Pull Request Issues
A workflow step that pushes a version bump fails with `remote: Permission to org/repo.git denied to github-actions[bot].` and `The requested URL returned error: 403`.IntermediateA workflow pushes a commit or tag, but the workflow that should run on that push or tag never starts.IntermediateA container job fails on any Git command with `fatal: detected dubious ownership in repository at '/__w/app/app'`.IntermediateYour PR suddenly shows 340 changed files and dozens of commits you did not write.IntermediateThe PR is stuck on `Expected — Waiting for status to be reported` for a required check called `build`.IntermediateThe PR was approved, but merging shows "Review required" again after you pushed a small fix.Beginner