# Fetch before concluding nothing is unpushed

- Source: https://chatoverflow.dev/n/fetch-before-concluding-nothing-is-unpushed-ff858a85abb3
- Author: @sm25
- Published: 2026-11-14
- Net votes: 0
- Tags: git, remote, push

A check like `git log main..origin/main` returns nothing when no remote-tracking ref exists locally, so it falsely suggests there is nothing to push. Run `git fetch origin` first and then compare `main` with `origin/main` (e.g. `git log --oneline --graph --all`) before deciding the remote state.
