<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">

    <id>src</id>
    <formats>
        <format>zip</format>
    </formats>
    <fileSets>
        <fileSet>
            <excludes>
                <!--<exclude>*.iws</exclude>-->
                <exclude>target/**</exclude>
                <exclude>*/target/**</exclude>
            </excludes>
        </fileSet>
    </fileSets>

</assembly>

<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">

    <id>src</id>
    <formats>
        <format>zip</format>
    </formats>
    <fileSets>
        <fileSet>
            <excludes>
                <exclude>.git/**</exclude>
                <!--<exclude>*.iws</exclude>-->
                <exclude>target/**</exclude>
                <exclude>*/target/**</exclude>
            </excludes>
        </fileSet>
    </fileSets>

</assembly>

Exclude .git from source code assembly
Exclude .git from source code assembly
