Skip to content
GitTree
Troubleshooting

A push was rejected

A push is refused for one of three reasons, and GitTree says which. The remote refused …: the remote has commits your branch does not. The remote declined the push: a hook or branch protection said no, with its reason. … moved: a force push with lease found the remote no longer where you last fetched it, so nothing was replaced.

FreeUpdated

Works in GitTree Free: every local Git feature, once you are signed in.

On this page
  1. Before you start
  2. Where to find it
  3. Steps
  4. Expected result
  5. If something goes wrong
  6. Questions
  7. Related

Before you start

  • You tried to push and GitTree showed a rejection.

Where to find it

  • The dialog GitTree shows after the push.
ActionmacOSWindows and Linux
Push⌘⇧UCtrl+Shift+U

Steps

  1. When the remote has new commits

    Choose Merge and Push or Rebase and Push to bring them in and push, or Fetch Only to look first.

  2. When a rule declined it

    Read the reason under The remote declined the push. For a protected branch, choose Push to a New Branch… and open a pull request.

  3. When the lease no longer holds

    Fetch to see what moved, review it, then decide again. GitTree never force-pushes over commits you have not seen.

Expected result

Your commits reach the remote without overwriting anyone else’s.

If something goes wrong

“… has no upstream to bring in; fetch, then set its upstream first”

Fetch, then set the branch’s upstream (Tracking and publishing).

Questions

When should I force push?

Only on your own branch after rewriting it, and with the lease GitTree uses. See Force push with lease.