Explain git push errors

Paste a git push error, such as "! [rejected] main -> main (fetch first)", and Vibe explains it in plain English: what the remote has that your copy doesn't, and how to bring it in without deleting anyone's work.

push-error.txt

Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.

Vibe9 lines selected

Press Explain it for the sample, or paste your own code first.

What this git push rejected sample shows

the message
! [rejected] with (fetch first) means the remote's main has a commit this copy has never seen, so git refused to replace it, and the push ended with exit code 1. The To line names the remote, here /home/dev/remote/blog.git. The hints say what to do: bring in the other work with git pull before pushing again.
fetch first or non-fast-forward
git fetch then git status said Your branch and 'origin/main' have diverged, with 1 different commit on each side: this copy's Add the second post and the other clone's Reword the README. git log --oneline --graph --all drew the 2 lines splitting after Start the blog. Pushing again after the fetch failed with (non-fast-forward) instead: the same problem, now that git knows the other commit.
rebase, then push
git pull --rebase put the local commit on top of the remote one and printed Successfully rebased and updated refs/heads/main., then git push printed 2e23ad4..16d8d0d with exit code 0. The log now shows 3 commits in a row, with Reword the README kept. The local commit got a new hash, 16d8d0d instead of 3d47844, because a rebase rewrites it.
divergent branches
Plain git pull stopped with fatal: Need to specify how to reconcile divergent branches. and exit code 128. Its hints list 3 settings, pull.rebase false to merge, pull.rebase true to rebase and pull.ff only, and say --rebase on the command line works for one pull, which is what the fix above used.

Good to know

  • Run with git 2.55.0 on Linux in a test folder mounted at /home/dev, with a local repository at /home/dev/remote/blog.git standing in for GitHub, which is why the To line shows that path. On your computer it shows your own remote's address.
  • When both copies changed the same line, the push failed with the same (fetch first), and git pull --rebase stopped with CONFLICT (content): Merge conflict in posts/hello.md, leaving both versions in the file between <<<<<<< HEAD and >>>>>>> lines. Git's hint says to fix the file, git add it and run git rebase --continue.

Before you trust it: git push --force makes the error go away by deleting the other work. It printed (forced update) with exit code 0, and origin/main then held only Add the second post and Start the blog: the other clone's Reword the README commit was gone from the remote, and git pull in that clone failed with the divergent-branches error. When an AI tool suggests --force for this error, fetch and read the other commit first.

Explain git push errors beside your editor

Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).

Install on Mac

curl -fsSL https://unvibe.site/install.sh | bash

Paste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.

No install warning? Use Unvibe in your browser

Opening the .dmg the first time

Unvibe isn't notarized by Apple yet, so macOS blocks the first open until you allow it. Its code is public on GitHub.

  1. Open the .dmg, drag Unvibe to Applications and open it. macOS says it can't verify it. Click Done, not the blue Move to Trash.
    macOS dialog: “Unvibe” Not Opened, with a blue Move to Trash button on top and Done under it
    Real screen, macOS 26. On macOS 15 the two buttons sit side by side.
  2. System Settings › Privacy & Security, scroll down to Security, then press Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.
    macOS Privacy & Security, Security section: Unvibe was blocked to protect your Mac, with the Open Anyway button
    Real screen, macOS 15
  3. Unvibe opens. You only do this once, and later versions install from inside the app with one click.
    Unvibe's first window: Vibe says Hey! I'm Vibe. I explain the code AI writes for you, right beside your editor, over the title Understand the code AI writes
    Real screen, Unvibe 0.1.51 on macOS 26

The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open