X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fhowto%2Frebase-from-internal-branch.txt;h=3b3a5c2e69e59d4708171ba745d7d4009788102b;hb=f7b47b273ed2c9e9b298c4f5dd02884b46dfbced;hp=8109b7ff26dc2010539f756ea47fda11483289a9;hpb=da27f4f3f4c23d0276a372726ed050ed13e45168;p=git.git diff --git a/Documentation/howto/rebase-from-internal-branch.txt b/Documentation/howto/rebase-from-internal-branch.txt index 8109b7ff2..3b3a5c2e6 100644 --- a/Documentation/howto/rebase-from-internal-branch.txt +++ b/Documentation/howto/rebase-from-internal-branch.txt @@ -3,6 +3,11 @@ To: git@vger.kernel.org Cc: Petr Baudis , Linus Torvalds Subject: Re: sending changesets from the middle of a git tree Date: Sun, 14 Aug 2005 18:37:39 -0700 +Abstract: In this article, JC talks about how he rebases the + public "pu" branch using the core GIT tools when he updates + the "master" branch, and how "rebase" works. Also discussed + is how this applies to individual developers who sends patches + upstream. Petr Baudis writes: @@ -33,12 +38,9 @@ ancestry graph looked like this: So I started from master, made a bunch of edits, and committed: $ git checkout master - $ cd Documentation; ed git.txt git-apply-patch-script.txt ... + $ cd Documentation; ed git.txt ... $ cd ..; git add Documentation/*.txt - $ git commit -s -v - -NOTE. The -v flag to commit is a handy way to make sure that -your additions are not introducing bogusly formatted lines. + $ git commit -s After the commit, the ancestry graph would look like this: @@ -93,7 +95,7 @@ to do cherrypicking using only the core GIT tools. Let's go back to the earlier picture, with different labels. You, as an individual developer, cloned upstream repository and -amde a couple of commits on top of it. +made a couple of commits on top of it. *your "master" head upstream --> #1 --> #2 --> #3 @@ -104,9 +106,9 @@ prepare #2 and #3 for e-mail submission. $ git format-patch master^^ master -This creates two files, 0001-XXXX.txt and 0002-XXXX.txt. Send +This creates two files, 0001-XXXX.patch and 0002-XXXX.patch. Send them out "To: " your project maintainer and "Cc: " your mailing -list. You could use contributed script git-send-email-script if +list. You could use contributed script git-send-email if your host has necessary perl modules for this, but your usual MUA would do as long as it does not corrupt whitespaces in the patch. @@ -122,7 +124,7 @@ up your changes, along with other changes. The two commits #2' and #3' in the above picture record the same changes your e-mail submission for #2 and #3 contained, but -probably with the new sign-off line added by the upsteam +probably with the new sign-off line added by the upstream maintainer and definitely with different committer and ancestry information, they are different objects from #2 and #3 commits.