diff --git a/templates/console-full/.gitignore b/templates/console-full/.gitignore
index 3e3ef75f6fd93bf4510a62f9da2c0dd2824d57da..ef1c6812c2c55124b464ceee99922402cbebf9b2 100644
--- a/templates/console-full/.gitignore
+++ b/templates/console-full/.gitignore
@@ -2,8 +2,8 @@
 .buildlog
 .packages
 .project
-.pub
-build
+.pub/
+build/
 packages
 pubspec.lock # (Remove this pattern if you wish to check in your lock file)
 
diff --git a/templates/package-simple/.gitignore b/templates/package-simple/.gitignore
index 8f462e3086933c04326a6282e77f4e673b786c01..beff8a4211510fcdd3be4de7c9f2193c1cb38210 100644
--- a/templates/package-simple/.gitignore
+++ b/templates/package-simple/.gitignore
@@ -2,8 +2,8 @@
 .buildlog
 .packages
 .project
-.pub
-build
+.pub/
+build/
 packages
 pubspec.lock
 
diff --git a/templates/server-appengine/.gitignore b/templates/server-appengine/.gitignore
index 3e3ef75f6fd93bf4510a62f9da2c0dd2824d57da..ef1c6812c2c55124b464ceee99922402cbebf9b2 100644
--- a/templates/server-appengine/.gitignore
+++ b/templates/server-appengine/.gitignore
@@ -2,8 +2,8 @@
 .buildlog
 .packages
 .project
-.pub
-build
+.pub/
+build/
 packages
 pubspec.lock # (Remove this pattern if you wish to check in your lock file)
 
diff --git a/templates/server-shelf/.gitignore b/templates/server-shelf/.gitignore
index 3e3ef75f6fd93bf4510a62f9da2c0dd2824d57da..ef1c6812c2c55124b464ceee99922402cbebf9b2 100644
--- a/templates/server-shelf/.gitignore
+++ b/templates/server-shelf/.gitignore
@@ -2,8 +2,8 @@
 .buildlog
 .packages
 .project
-.pub
-build
+.pub/
+build/
 packages
 pubspec.lock # (Remove this pattern if you wish to check in your lock file)
 
diff --git a/templates/web-polymer/.gitignore b/templates/web-polymer/.gitignore
index 3e3ef75f6fd93bf4510a62f9da2c0dd2824d57da..ef1c6812c2c55124b464ceee99922402cbebf9b2 100644
--- a/templates/web-polymer/.gitignore
+++ b/templates/web-polymer/.gitignore
@@ -2,8 +2,8 @@
 .buildlog
 .packages
 .project
-.pub
-build
+.pub/
+build/
 packages
 pubspec.lock # (Remove this pattern if you wish to check in your lock file)
 
diff --git a/templates/web-simple/.gitignore b/templates/web-simple/.gitignore
index 3e3ef75f6fd93bf4510a62f9da2c0dd2824d57da..ef1c6812c2c55124b464ceee99922402cbebf9b2 100644
--- a/templates/web-simple/.gitignore
+++ b/templates/web-simple/.gitignore
@@ -2,8 +2,8 @@
 .buildlog
 .packages
 .project
-.pub
-build
+.pub/
+build/
 packages
 pubspec.lock # (Remove this pattern if you wish to check in your lock file)