3 dgit - tutorial for package maintainers already using git-buildpackage(1)
7 This document explains how B<dgit> can be incorporated into a
8 git-buildpackage(1) package-maintenance workflow. This should be read
9 jointly with git-buildpackage(1)'s documentation. Some reasons why
10 you might want to incorporate B<dgit> into your existing workflow:
16 Benefit from dgit's safety catches. In particular, ensure that your
17 upload always matches exactly your git HEAD.
21 Provide a better, more detailed git history to downstream dgit users,
22 such as people using dgit to do an NMU (see dgit-nmu-simple(7) and
27 Note that we assume a patches-unapplied repository: the upstream
28 source committed to the git repository is unpatched.
29 git-buildpackage(1) can work with patched-applied repositories, but is
30 normally used with patches-unapplied.
32 =head1 GIT CONFIGURATION
38 % git config dgit.default.quilt-mode gbp
42 in your repository, you can omit I<--gbp> wherever it occurs below.
44 Note that this does require that you always work from your gbp master
45 branch, never the dgit patches-applied branch.
49 If you use gbp-buildpackage(1) to generate your orig tarballs, you
50 will need to perform the first build with gbp-buildpackage(1) directly
51 (this is due to Debian bug #841084).
53 Otherwise, you can perform builds like this:
57 % dgit [--allow-dirty] gbp-build [OPTIONS]
61 where I<--allow-dirty> is needed for testing uncommitted changes, and
62 I<OPTIONS> are any further options to be passed on to
65 When you are ready to build for upload, you will probably want to use
66 sbuild(1) or pbuilder(1), or do a source-only upload. Either
70 % dgit --rm-old-changes --gbp sbuild
78 % dgit --rm-old-changes gbp-build --git-pbuilder
86 % dgit --rm-old-changes --gbp build-source
90 We use I<--rm-old-changes> to ensure that there is exactly one changes
91 file corresponding to this package, so we can be confident we're
92 uploading what we intend (though B<dgit push> will do some safety
95 Note that all of the commands in this section are not required to
96 upload with dgit. You can invoke gbp-buildpackage(1), pbuilder(1) and
97 sbuild(1) directly. However, the defaults for these tools may leave
98 you with something that dgit will refuse to upload because it doesn't
99 match your git HEAD. As a general rule, leave all signing and tagging
104 Don't use I<--git-tag>: B<dgit push> will do this for you. To upload:
112 This will push your git history to the dgit-repos, but you probably
113 want to follow it up with a push to alioth.
115 You will need to pass I<--overwrite> if the previous upload was not
118 =head1 INCORPORATING NMUS
120 B<dgit pull> can't yet incorporate NMUs into patches-unapplied gbp
121 branches. You can just apply the NMU diff the traditional way. The
122 next upload will require I<--overwrite>.
130 This tutorial was written and is maintained by Sean Whitton <spwhitton@spwhitton.name>.