# Special Use 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:

      git branch dfsg_clean upstream

This creates the dfsg_clean branch from the tip of a branch called upstream. Then, when importing a new upstream version, you import the new version on the `upstream-branch` (by default named upstream) as usual and just don't merge to the debian-branch (by default named master):

      gbp import-orig --no-merge /path/to/nondfsg-clean-package_10.4.orig.tar.gz
      git tag 10.4

After the import, you can switch to the dfsg_clean branch and get the newly imported changes from the upstream branch:

      git checkout dfsg_clean
      git pull . upstream

Now make this checkout dfsg clean (preferably by a cleanup script), commit your changes and merge to your `debian-branch`:

      cleanup-script.sh
      git commit -a -m "Make source dfsg clean"
      git tag 10.4.dfsg
      git checkout master
      git pull . dfsg_clean