List Info

Thread: Documentation: Two more git-rebase --onto examples




Documentation: Two more git-rebase --onto examples
user name
2006-11-04 21:05:57
Added example of transplantig feature branch from one
development
branch (for example "next") into the other
development branch (for
example "master").

Added example of rebasing part of branch, or transplanting
feature
branch from the tip of other feature branch to the
development branch
the second feature branch started from.

Signed-off-by: Jakub Narebski <jnarebgmail.com>
---
I asked for comments because I'm not native English speaker
and I'm not
sure about correctness of descriptions of added examples.

P.S. Perhaps we should separate the part dealing with
CONFLICT(contents)
into separate documentation file, and include it as needed
(for example
alsop in git-push(1)).

 Documentation/git-rebase.txt |   55
++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-rebase.txt
b/Documentation/git-rebase.txt
index 10f2924..1308d2f 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
 -65,6
+65,61  would be:
     D---E---F---G master
 ------------
 
+More useful example of --onto option usage include
transplanting feature
+branch from one development branch to other, for example
change to branch
+based off "next" branch:
+
+------------
+    o---o---o---o---o  master
+         
+          o---o---o---o---o  next
+                           
+                            o---o---o  topic
+------------
+
+to being a branch based off "master" branch as
shown below:
+
+------------
+    o---o---o---o---o  master
+        |            
+        |             o'--o'--o'  topic
+         
+          o---o---o---o---o  next
+------------
+
+We can get this using the following command:
+
+    git-rebase --onto master next topic
+
+
+Yet another example of use for --onto option is to rebase
part of
+branch. If we have the following situation:
+
+------------
+                            H---I---J topicB
+                           /
+                  E---F---G  topicA
+                 /
+    A---B---C---D  master
+------------
+
+then the command
+
+    git-rebase --onto master topicA topicB
+
+would give us the following situation:
+
+------------
+                 H'--I'--J'  topicB
+                /
+                | E---F---G  topicA
+                |/
+    A---B---C---D  master
+------------
+
+with "topicB" branch based off
"master".
+
+
 In case of conflict, git-rebase will stop at the first
problematic commit
 and leave conflict markers in the tree.  You can use git
diff to locate
 the markers (<<<<<<) and make edits to
resolve the conflict.  For each
-- 
1.4.3.3

-
To unsubscribe from this list: send the line
"unsubscribe git" in
the body of a message to majordomovger.kernel.org
More majordomo info at  http://vge
r.kernel.org/majordomo-info.html
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )