diff --git a/packages/react-scripts/scripts/init.js b/packages/react-scripts/scripts/init.js
index 38deea60259f4f604294d44a0dd4be8389563b50..8837c28ea64922063fcf4ab89506f1bf487af55c 100644
--- a/packages/react-scripts/scripts/init.js
+++ b/packages/react-scripts/scripts/init.js
@@ -17,10 +17,49 @@ process.on('unhandledRejection', err => {
 const fs = require('fs-extra');
 const path = require('path');
 const chalk = require('chalk');
+const execSync = require('child_process').execSync;
 const spawn = require('react-dev-utils/crossSpawn');
 const { defaultBrowsers } = require('react-dev-utils/browsersHelper');
 const os = require('os');
 
+function insideGitRepository() {
+  try {
+    execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
+    return true;
+  } catch (e) {
+    return false;
+  }
+}
+
+function insideMercurialRepository() {
+  try {
+    execSync('hg --cwd . root', { stdio: 'ignore' });
+    return true;
+  } catch (e) {
+    return false;
+  }
+}
+
+function gitInit() {
+  try {
+    execSync('git --version', { stdio: 'ignore' });
+
+    if (insideGitRepository() || insideMercurialRepository()) {
+      return false;
+    }
+
+    execSync('git init', { stdio: 'ignore' });
+    execSync('git add -A', { stdio: 'ignore' });
+    execSync('git commit -m "Initial commit from Create React App"', {
+      stdio: 'ignore',
+    });
+
+    return true;
+  } catch (e) {
+    return false;
+  }
+}
+
 module.exports = function(
   appPath,
   appName,
@@ -134,6 +173,10 @@ module.exports = function(
     }
   }
 
+  if (gitInit()) {
+    console.log('Initialized git repository');
+  }
+
   // Display the most elegant way to cd.
   // This needs to handle an undefined originalDirectory for
   // backward compatibility with old global-cli's.
diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh
index a1e1ccc9d42b17e86e57e7df0dac7635599f6ed1..b849c36794433810ec5b27fe59c887d151e03f71 100755
--- a/tasks/e2e-kitchensink.sh
+++ b/tasks/e2e-kitchensink.sh
@@ -174,6 +174,12 @@ rm .babelrc
 # Finally, let's check that everything still works after ejecting.
 # ******************************************************************************
 
+# Commiting changes
+git config user.email "you@example.com"
+git config user.name "Your Name"
+git add .
+git commit -m "Before npm run eject"
+
 # Eject...
 echo yes | npm run eject
 
diff --git a/tasks/e2e-simple.sh b/tasks/e2e-simple.sh
index 8ea08b55611f889f3d68a4076bf3f36f4c8cbbb7..7c158b3704e6418e15c8b10aa3225e26278365e8 100755
--- a/tasks/e2e-simple.sh
+++ b/tasks/e2e-simple.sh
@@ -261,6 +261,12 @@ verify_module_scope
 # Finally, let's check that everything still works after ejecting.
 # ******************************************************************************
 
+# Commiting changes
+git config user.email "you@example.com"
+git config user.name "Your Name"
+git add .
+git commit -m "Before npm run eject"
+
 # Eject...
 echo yes | npm run eject