mislav / hub

A command-line tool that makes git easier to use with GitHub.

Home Page:https://hub.github.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`git pull --rebase` for `hub sync`

j20120307 opened this issue · comments

The problem I'm trying to solve:
Reference:
#618
#1265

Here is the spec of the command from https://hub.github.com/hub-sync.1.html

If the local branch contains unpushed work, warn about it;

I'd like an extension of hub sync so it supports pull --rebase.

I have multiple local branch pointing to remote mainline so that I can work on non-conflicting features. Once I merged in a change from branch_a, I want to do a git pull --rebase on all my existing branches. What I have to do right now is

  1. git checkout branch_b
  2. git pull --rebase

and repeat for all my local branches. hub sync solves the problem if it's behind the remote head, however I'd like it to support git pull --rebase; if there is a conflict on the branch, do a git rebase --abort

How I imagine hub could expose this functionality:
hub sync --rebase