'git rebase' 是否应至少接受一个参数?仅使用 'git rebase' 意味着什么?
答案1
摘自手册页(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.
这意味着,只要此分支已存在已配置的上游,则git rebase
本身默认为,否则,它将中止。git
rebase
branch.<name>.remote
branch.<name>
如果您只给它一个参数,它将是上游分支的名称,同时让您保持在原来的分支中。