Now you simply need to ensure that your git HEAD is dgit-compatible,
i.e., it is exactly what you would get if you ran
-B<dpkg-buildpackage -i\.git/ -I.git -S>
+B<dpkg-buildpackage -i'\.git/' -I.git -S>
and then unpacked the resultant source package.
To achieve this, you might need to delete