+4

Pull: Automatically decide between merge and rebase (smart pull)

jonathan bogdoll 4 years ago 0

Pull already lets you choose between merge and rebase as well as setting a default action. I propose an additional smart mode mapped to a separate toolbar button, which can be added to the toolbar and/or replace regular pull if desired:

- If there are no local changes...

-- ... and no local commits, fast forward without asking

-- ... and local commits, rebase without asking (optional warning, if there are a lot of incoming commits)

- If there are local changes...

-- ... and no local commits, attempt to pull with merge, on failure offer stash&retry

-- ... and local commits, warn user and offer to stash and proceed with rebase