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.
Works in GitTree Free: every local Git feature, once you are signed in.
On this page
Before you start
- You tried to push and GitTree showed a rejection.
Where to find it
- The dialog GitTree shows after the push.
| Action | macOS | Windows and Linux |
|---|---|---|
| Push | ⌘⇧U | Ctrl+Shift+U |
Steps
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.
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.
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.