To update your patches for a new upstream version one
Imports the current patches onto the patch-queue branch (if
not done already) using gbp pq
import. This will allow you
to rebase the patches on the new upstream version later.
Imports the new upstream version with
Rebases the patches onto the new upstream version using
rebase. This will bring the patches up to date
regarding the new upstream version. Patches already applied
upstream can be dropped and remaining patches can be modified
to apply to the new version.
Exports the patches to
But don't worry if you forgot to do so before importing the new version (or if another team member imported the version already).
In this case you can make gbp pq figure out where to apply the
patches by using the
--time-machine= option. The
would drop your current patch-queue branch (if existent) and
create a new one by going back in your commit history as far as 10
commits to find a place where your patches still
apply . If it finds such a commit on
debian-branch it will create the patch-queue branch from
there and switch you to that branch. You can now rework your
patches to apply to the new upstream version by using
or you can invoke git
git rebase -i debian/sid
Should the rebase fail (e.g. because the upstream source changed
at the same place your patches modify the code) you can resolve
this by using the options of git
you simply want to abort use
Once done you can export your commits to patch files again:
The export will also switch you back to the
See this in action in a short video.
 This is not necessarily your debian-branch; HEAD since the new upstream version might have changed so that the patches no longer apply cleanly there.