2005-09-08 04:26:23 +04:00
|
|
|
git-rebase(1)
|
|
|
|
=============
|
2005-08-23 12:49:47 +04:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2006-03-09 19:24:50 +03:00
|
|
|
git-rebase - Rebase local commits to new upstream head
|
2005-08-23 12:49:47 +04:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2006-02-22 04:10:12 +03:00
|
|
|
'git-rebase' [--onto <newbase>] <upstream> [<branch>]
|
2005-08-23 12:49:47 +04:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2006-02-22 04:10:12 +03:00
|
|
|
git-rebase applies to <upstream> (or optionally to <newbase>) commits
|
|
|
|
from <branch> that do not appear in <upstream>. When <branch> is not
|
|
|
|
specified it defaults to the current branch (HEAD).
|
|
|
|
|
|
|
|
When git-rebase is complete, <branch> will be updated to point to the
|
|
|
|
newly created line of commit objects, so the previous line will not be
|
|
|
|
accessible unless there are other references to it already.
|
|
|
|
|
|
|
|
Assume the following history exists and the current branch is "topic":
|
|
|
|
|
|
|
|
A---B---C topic
|
|
|
|
/
|
|
|
|
D---E---F---G master
|
|
|
|
|
2006-03-18 03:25:30 +03:00
|
|
|
From this point, the result of either of the following commands:
|
2006-02-22 04:10:12 +03:00
|
|
|
|
|
|
|
git-rebase master
|
|
|
|
git-rebase master topic
|
|
|
|
|
|
|
|
would be:
|
|
|
|
|
|
|
|
A'--B'--C' topic
|
|
|
|
/
|
|
|
|
D---E---F---G master
|
|
|
|
|
2006-03-18 03:25:30 +03:00
|
|
|
While, starting from the same point, the result of either of the following
|
2006-02-22 04:10:12 +03:00
|
|
|
commands:
|
|
|
|
|
|
|
|
git-rebase --onto master~1 master
|
|
|
|
git-rebase --onto master~1 master topic
|
|
|
|
|
|
|
|
would be:
|
|
|
|
|
|
|
|
A'--B'--C' topic
|
|
|
|
/
|
|
|
|
D---E---F---G master
|
2005-08-23 12:49:47 +04:00
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2006-02-22 04:10:12 +03:00
|
|
|
<newbase>::
|
|
|
|
Starting point at which to create the new commits. If the
|
|
|
|
--onto option is not specified, the starting point is
|
|
|
|
<upstream>.
|
|
|
|
|
2005-08-27 05:18:48 +04:00
|
|
|
<upstream>::
|
|
|
|
Upstream branch to compare against.
|
2005-08-23 12:49:47 +04:00
|
|
|
|
2006-03-18 03:25:30 +03:00
|
|
|
<branch>::
|
2005-08-27 05:18:48 +04:00
|
|
|
Working branch; defaults to HEAD.
|
2005-08-23 12:49:47 +04:00
|
|
|
|
|
|
|
Author
|
|
|
|
------
|
|
|
|
Written by Junio C Hamano <junkio@cox.net>
|
|
|
|
|
|
|
|
Documentation
|
|
|
|
--------------
|
|
|
|
Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
|
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
2005-09-19 14:10:51 +04:00
|
|
|
Part of the gitlink:git[7] suite
|
2005-08-23 12:49:47 +04:00
|
|
|
|