diff --git a/cli/cli.go b/cli/cli.go
index <HASH>..<HASH> 100644
--- a/cli/cli.go
+++ b/cli/cli.go
@@ -420,6 +420,10 @@ var serveCommand = &cobra.Command{
 			Filter: func(addPath, basePath string) bool {
 				addPath = assets.EnsureSlash(addPath)
 
+				if strings.Index(addPath, ".git") != -1 {
+					return false
+				}
+
 				if strings.Index(addPath, ustrip) == -1 {
 					return false
 				}
@@ -484,6 +488,10 @@ var serveCommand = &cobra.Command{
 					return true
 				}
 
+				if strings.Index(addPath, ".git") != -1 {
+					return false
+				}
+
 				if !(filepath.Ext(addPath) == ".go") {
 					return false
 				}
separated asset and binary building to reduce rebuild time with added config options