2005-09-08 02:26:23 +02:00
|
|
|
git-rebase(1)
|
|
|
|
=============
|
2005-08-23 10:49:47 +02:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2006-03-09 17:24:50 +01:00
|
|
|
git-rebase - Rebase local commits to new upstream head
|
2005-08-23 10:49:47 +02:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2006-02-22 02:10:12 +01:00
|
|
|
'git-rebase' [--onto <newbase>] <upstream> [<branch>]
|
2005-08-23 10:49:47 +02:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2006-02-22 02:10:12 +01: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 01:25:30 +01:00
|
|
|
From this point, the result of either of the following commands:
|
2006-02-22 02:10:12 +01:00
|
|
|
|
|
|
|
git-rebase master
|
|
|
|
git-rebase master topic
|
|
|
|
|
|
|
|
would be:
|
|
|
|
|
|
|
|
A'--B'--C' topic
|
|
|
|
/
|
|
|
|
D---E---F---G master
|
|
|
|
|
2006-03-18 01:25:30 +01:00
|
|
|
While, starting from the same point, the result of either of the following
|
2006-02-22 02:10:12 +01: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 10:49:47 +02:00
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2006-02-22 02:10:12 +01: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 03:18:48 +02:00
|
|
|
<upstream>::
|
|
|
|
Upstream branch to compare against.
|
2005-08-23 10:49:47 +02:00
|
|
|
|
2006-03-18 01:25:30 +01:00
|
|
|
<branch>::
|
2005-08-27 03:18:48 +02:00
|
|
|
Working branch; defaults to HEAD.
|
2005-08-23 10:49:47 +02: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 12:10:51 +02:00
|
|
|
Part of the gitlink:git[7] suite
|
2005-08-23 10:49:47 +02:00
|
|
|
|