chiark / gitweb /
dgit-maint-debrebase(7): it's an example
[dgit.git] / dgit-maint-debrebase.7.pod
index 63b964131660d3aacb819a28ef3e940d01711164..cd470ce144f077a273317a4b16872baace00cc4f 100644 (file)
@@ -17,7 +17,7 @@ Some advantages of this workflow:
 
 =item
 
-Manipulate the patch queue using the full power of git-rebase(1),
+Manipulate the delta queue using the full power of git-rebase(1),
 instead of relying on quilt(1), and without having to switch back and
 forth between patches-applied and patches-unapplied branches when
 committing changes and trying to build, as with gbp-pq(1).
@@ -55,8 +55,9 @@ This workflow is appropriate for packages where the Debian delta
 contains multiple pieces which interact, or which you don't expect to
 be able to upstream soon.  For packages with simple and/or short-lived
 Debian deltas, use of git-debrebase(1) might introduce unneeded
-complexity (for examples, see "BEHAVIOUR TO AVOID" below).  For such
-packages, consider the workflow described in dgit-maint-merge(7).
+complexity -- for example, you cannot use B<git merge> to incorporate
+changes from other contributors.  For such packages, consider the
+workflow described in dgit-maint-merge(7).
 
 =head1 INITIAL DEBIANISATION
 
@@ -94,11 +95,11 @@ something like this:
 
 Now go ahead and Debianise your package.  Just make commits on the
 master branch, adding things in the I<debian/> directory.  If you need
-to patch the upstream source, see "EDITING THE PATCH QUEUE", below.
+to patch the upstream source, see "EDITING THE DELTA QUEUE", below.
 Note that there is no need to maintain a separate 'upstream' branch,
 unless you also happen to be involved in upstream development.  We
-work with upstream tags rather than any branches, except when
-forwarding patches (see FORWARDING PATCHES UPSTREAM, below).
+work with upstream tags rather than any branches, except temporary
+branches used to prepare patches for forwarding upstream, for example.
 
 Finally, you need an orig tarball:
 
@@ -270,6 +271,25 @@ I<--deliberately-not-fast-forward> instead of I<--overwrite>.  This
 avoids introducing a new origin commit into your git history.  (This
 origin commit would represent the most recent non-dgit upload of the
 package, but this should already be represented in your git history.)
+=head1 GIT CONFIGURATION
+
+This workflow does not support using B<git merge> to merge divergent
+branches of development (see "OTHER MERGES" in git-debrebase(5)).  You
+should configure git such that B<git pull> does not try to merge:
+
+=over 4
+
+    % git config --local pull.rebase true
+
+=back
+
+Now when you pull work from other Debian contributors, git will rebase
+your work on top of theirs.
+
+If you use this repository for upstream development in addition to
+Debian packaging work, you may not want to set this global setting.
+Instead, see the B<branch.autoSetupRebase> and
+B<branch.E<lt>nameE<gt>.rebase> settings in git-config(5).
 
 =head1 IMPORTING NEW UPSTREAM RELEASES
 
@@ -338,7 +358,7 @@ a tarball:
 
 =back
 
-=head1 EDITING THE PATCH QUEUE
+=head1 EDITING THE DELTA QUEUE
 
 =head2 Adding new patches
 
@@ -379,7 +399,7 @@ using git-rebase(1).  For example,
 =back
 
 If you take this approach, you should be very careful not to start the
-rebase earlier than the beginning of the patch queue.
+rebase earlier than the beginning of the delta queue.
 
 =head2 Editing patches: finishing a debrebase
 
@@ -401,12 +421,12 @@ git remote such as B<salsa.debian.org>,
 
 Note that each time you stitch a debrebase you introduce a pseudomerge
 into your git history, which may make it harder to read.  Try to do
-all of the editing of the patch queue that you think will be needed
+all of the editing of the delta queue that you think will be needed
 for this upload in a single debrebase, so that there is a single
 debrebase stitch.
 
 A strategy is to debrebase only right before you upload.  Before that
-point, instead of editing the existing patch series, you append fixup
+point, instead of editing the existing delta queue, you append fixup
 commits (and reversions of commits) that alter the upstream source to
 the required state.  You can freely push and pull from
 B<salsa.debian.org> during this.  Just before uploading, you debrebase
@@ -434,10 +454,10 @@ If you want to skip dgit's checks while iterating on a problem with
 the package build (for example, you don't want to commit your changes
 to git), you can just run dpkg-buildpackage(1) or debuild(1) instead.
 
-=head2 Laundering the patch queue before uploading
+=head2 Laundering the delta queue before uploading
 
 Just before you B<dgit push> or B<dgit push-source>, you might want to
-have git-debrebase(1) shuffle your branch such that the Debian patch
+have git-debrebase(1) shuffle your branch such that the Debian delta
 queue appears at the end:
 
 =over 4
@@ -485,9 +505,24 @@ option detailed in gbp-import-orig(1).
 
 =head1 INCORPORATING NMUS
 
+In the simplest case,
+
 =over 4
 
-    % dgit pull
+    % dgit fetch
+    % git merge --ff-only dgit/dgit/sid
+
+=back
+
+If that fails, because your branch and the NMUers work represent
+divergent branches of development, you have a number of options.  Here
+we describe the two simplest.
+
+=head2 Rebasing your work onto the NMU
+
+=over 4
+
+    % git rebase dgit/dgit/sid
 
 =back
 
@@ -496,7 +531,14 @@ probably want to debrebase before your next upload to tidy those up.
 
 For example, the NMUer might have used git-revert(1) to unapply one of
 your patches.  A debrebase will strip both the patch and the reversion
-from the patch series.
+from the delta queue.
+
+=head2 Manually applying the debdiff
+
+If you cannot rebase because you have already pushed to
+B<salsa.debian.org>, say, you can manually apply the NMU debdiff,
+commit and debrebase.  The next B<dgit push> will require
+I<--overwrite>.
 
 =head1 SEE ALSO