From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] Documentation: Transplanting branch with git-rebase --onto
Date: Mon, 6 Nov 2006 19:12:45 +0100 [thread overview]
Message-ID: <200611061912.46436.jnareb@gmail.com> (raw)
In-Reply-To: <200611051122.17623.jnareb@gmail.com>
Added example of transplantig feature branch from one development
branch (for example "next") into the other development branch (for
example "master").
[jn: with a little help from Junio]
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
What about this?
The second example I think has place in tutorial or GitTips on GitWiki
Documentation/git-rebase.txt | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 10f2924..9e822c5 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -65,6 +65,40 @@ would be:
D---E---F---G master
------------
+
+Here is how you would transplant a topic branch based on one
+branch to another, to pretend that you forked the topic branch
+from the latter branch, using `rebase --onto`.
+
+First let's assume your 'topic' is based on branch 'next'.
+For example feature developed in 'topic' depends on some
+functionality which is found in 'next'.
+
+------------
+ o---o---o---o---o master
+ \
+ o---o---o---o---o next
+ \
+ o---o---o topic
+------------
+
+We would want to make 'topic' forked from branch 'master',
+for example because the functionality 'topic' branch depend on
+got merged into more stable 'master' branch, like this:
+
+------------
+ 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
+
+
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.4
next prev parent reply other threads:[~2006-11-06 18:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-04 21:05 [PATCH/RFC] Documentation: Two more git-rebase --onto examples Jakub Narebski
2006-11-05 1:08 ` Junio C Hamano
2006-11-05 10:22 ` Jakub Narebski
2006-11-06 18:12 ` Jakub Narebski [this message]
2006-11-06 22:53 ` [PATCH] Documentation: Transplanting branch with git-rebase --onto 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=200611061912.46436.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).