From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH/RFC] Documentation: Two more git-rebase --onto examples
Date: Sat, 4 Nov 2006 22:05:57 +0100 [thread overview]
Message-ID: <200611042205.58212.jnareb@gmail.com> (raw)
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 <jnareb@gmail.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
next reply other threads:[~2006-11-04 21:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-04 21:05 Jakub Narebski [this message]
2006-11-05 1:08 ` [PATCH/RFC] Documentation: Two more git-rebase --onto examples Junio C Hamano
2006-11-05 10:22 ` Jakub Narebski
2006-11-06 18:12 ` [PATCH] Documentation: Transplanting branch with git-rebase --onto Jakub Narebski
2006-11-06 22:53 ` Junio C Hamano
2006-11-06 23:14 ` Jakub Narebski
2006-11-06 18:14 ` [PATCH/RFC] Documentation: Two more git-rebase --onto examples Carl Worth
2006-11-06 19:18 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611042205.58212.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).