Special usage cases Handling non-DFSG clean upstream sources If you have to handle non DFSG clean upstream sources you can use a different branch which you have to create once: &gitcmd; branch dfsg_clean upstream This creates the dfsg_clean branch from the tip of your upstream branch. Then, when importing a new upstream version you import the new version on the upstream branch as usual and just don't merge to the master branch by default: &git-import-orig; --no-merge nondfsg-clean-package_10.4.orig.tar.gz &gitcmd; tag; 10.4 After the import you can switch to the dfsg branch and get the newly imported changes from the upstream branch: &gitcmd; checkout dfsg_clean &gitcmd; pull . upstream Now make this dfsg clean (preverably by a cleanup script), commit your changes and merge to the master branch: cleanup-script.sh &gitcmd; commit -a -m "Make source dfsg clean" &gitcmd; tag 10.4.dfsg &gitcmd; checkout master &gitcmd; pull . dfsg_clean Importing NMUs First create a branch that holds the NMUs once: &gitcmd; nmu To import an NMU instead of a new upstream version you can use: &gitcmd; checkout master &git-import-orig; -u 10-1.1 --upstream-branch=nmu nmu-10-1.1.tar.gz This will import the NMU on the nmu branch instead of the upstream branch but merge the changes to the master branch as usual. You need to have the NMU as a single tar.gz, you can't use the dsc and diff.gz here, this will be fixed in a later version. Using &pbuilder; Since pbuilder use different command line arguments than &debuild; and &dpkg-buildpackage; we have to use a small script that's invoked by &git-buildpackage;: cat <<EOF >/usr/local/bin/git-pbuilder #!/bin/sh # pass all options to dpkg-buildpackage: pdebuild --debbuildopts "$*" EOF chmod a+x /usr/local/bin/git-pbuilder Furthermore we need a different clean command, since &pdebuildcmd; means something different than &debuildcmd; . We could put all this on the command line, but let's put it into the config file to safe typing: cat <<EOF > ~/.gbp.conf [DEFAULT] # tell git-buildpackage howto clean the source tree cleaner = fakeroot debian/rules clean # this is how we invoke pbuilder, arguments passed to git-buildpackage will be # passed to dpkg-buildpackge in the chroot builder = /usr/local/bin/git-pbuilder Invoking &git-buildpackage; will now invoke &pdebuildcmd; If you don't want this for all your invocations of &git-buildpackage; you can instead put this into .git/gbp.conf in one of your &git; repositories.