O que significa o comando 'git rebase' quando nenhum argumento é seguido?

O que significa o comando 'git rebase' quando nenhum argumento é seguido?

O 'git rebase' deveria ter pelo menos um argumento? O que significa apenas 'git rebase'?

Responder1

Retirado da página de manual ( git help rebase):

   git rebase [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>]
           [<upstream>] [<branch>]
   git rebase [-i | --interactive] [options] [--exec <cmd>] [--onto <newbase>]
           --root [<branch>]
   git rebase --continue | --skip | --abort | --edit-todo

   If <branch> is specified, git rebase will perform an automatic git
   checkout <branch> before doing anything else. Otherwise it remains on
   the current branch.

   If <upstream> is not specified, the upstream configured in
   branch.<name>.remote and branch.<name>.merge options will be used; see
   git-config(1) for details. If you are currently not on any branch or if
   the current branch does not have a configured upstream, the rebase will
   abort.

Isso significa que git rebase, sozinho, o padrão é git rebase branch.<name>.remote branch.<name>, desde que já exista um upstream configurado para esta ramificação - caso contrário, ele será abortado.

Se você fornecer apenas um argumento, será o nome do branch upstream, mantendo você no mesmo branch que estava.

informação relacionada