diff --git a/lib/api/github.js b/lib/api/github.js
index 7853881a80be66686e776413515b73e1e5104b3c..e90992511af2442befffc267c950b2c7e5e61aa4 100644
--- a/lib/api/github.js
+++ b/lib/api/github.js
@@ -75,8 +75,19 @@ async function branchExists(branchName) {
   try {
     const res = await ghGot(`repos/${config.repoName}/git/refs/heads/${branchName}`);
     if (res.statusCode === 200) {
-      logger.debug('Branch exists');
-      return true;
+      logger.debug(JSON.stringify(res.body));
+      if (Array.isArray(res.body)) {
+        // This seems to happen if GitHub has partial matches, so we check ref
+        const matchedBranch = res.body.some(branch => branch.ref === `refs/heads/${branchName}`);
+        if (matchedBranch) {
+          logger.debug('Branch exists');
+        } else {
+          logger.debug('No matching branches');
+        }
+        return matchedBranch;
+      }
+      // This should happen if there's an exact match
+      return res.body.ref === `refs/heads/${branchName}`;
     }
     // This probably shouldn't happen
     logger.debug('Branch doesn\'t exist');
diff --git a/test/api/__snapshots__/github.spec.js.snap b/test/api/__snapshots__/github.spec.js.snap
index 89d1260379ecdf6454327288233780266cab03ef..62d554f0b96ae474dd848c62b1c10619b7c74642 100644
--- a/test/api/__snapshots__/github.spec.js.snap
+++ b/test/api/__snapshots__/github.spec.js.snap
@@ -97,7 +97,58 @@ Array [
 ]
 `;
 
-exports[`api/github branchExists(branchName) should return true if the branch exists 1`] = `
+exports[`api/github branchExists(branchName) should return false if the branch does not exist (multiple results) 1`] = `
+Array [
+  Array [
+    "repos/some/repo",
+  ],
+  Array [
+    "repos/some/repo/git/refs/heads/master",
+  ],
+  Array [
+    "repos/some/repo/git/commits/1234",
+  ],
+  Array [
+    "repos/some/repo/git/refs/heads/thebranchname",
+  ],
+]
+`;
+
+exports[`api/github branchExists(branchName) should return false if the branch does not exist (one result) 1`] = `
+Array [
+  Array [
+    "repos/some/repo",
+  ],
+  Array [
+    "repos/some/repo/git/refs/heads/master",
+  ],
+  Array [
+    "repos/some/repo/git/commits/1234",
+  ],
+  Array [
+    "repos/some/repo/git/refs/heads/thebranchname",
+  ],
+]
+`;
+
+exports[`api/github branchExists(branchName) should return true if the branch exists (multiple results) 1`] = `
+Array [
+  Array [
+    "repos/some/repo",
+  ],
+  Array [
+    "repos/some/repo/git/refs/heads/master",
+  ],
+  Array [
+    "repos/some/repo/git/commits/1234",
+  ],
+  Array [
+    "repos/some/repo/git/refs/heads/thebranchname",
+  ],
+]
+`;
+
+exports[`api/github branchExists(branchName) should return true if the branch exists (one result) 1`] = `
 Array [
   Array [
     "repos/some/repo",
diff --git a/test/api/github.spec.js b/test/api/github.spec.js
index 1cf8de88a4b98609e6371a63ff35e13d7e568f25..494e58569942a8774f813085913c015842f71338 100644
--- a/test/api/github.spec.js
+++ b/test/api/github.spec.js
@@ -88,15 +88,58 @@ describe('api/github', () => {
     });
   });
   describe('branchExists(branchName)', () => {
-    it('should return true if the branch exists', async () => {
+    it('should return true if the branch exists (one result)', async () => {
       await initRepo('some/repo', 'token');
       ghGot.mockImplementationOnce(() => ({
         statusCode: 200,
+        body: {
+          ref: 'refs/heads/thebranchname',
+        },
+      }));
+      const exists = await github.branchExists('thebranchname');
+      expect(ghGot.mock.calls).toMatchSnapshot();
+      expect(exists).toBe(true);
+    });
+    it('should return true if the branch exists (multiple results)', async () => {
+      await initRepo('some/repo', 'token');
+      ghGot.mockImplementationOnce(() => ({
+        statusCode: 200,
+        body: [{
+          ref: 'refs/heads/notthebranchname',
+        }, {
+          ref: 'refs/heads/thebranchname',
+        }],
       }));
       const exists = await github.branchExists('thebranchname');
       expect(ghGot.mock.calls).toMatchSnapshot();
       expect(exists).toBe(true);
     });
+    it('should return false if the branch does not exist (one result)', async () => {
+      await initRepo('some/repo', 'token');
+      ghGot.mockImplementationOnce(() => ({
+        statusCode: 200,
+        body: {
+          ref: 'refs/heads/notthebranchname',
+        },
+      }));
+      const exists = await github.branchExists('thebranchname');
+      expect(ghGot.mock.calls).toMatchSnapshot();
+      expect(exists).toBe(false);
+    });
+    it('should return false if the branch does not exist (multiple results)', async () => {
+      await initRepo('some/repo', 'token');
+      ghGot.mockImplementationOnce(() => ({
+        statusCode: 200,
+        body: [{
+          ref: 'refs/heads/notthebranchname',
+        }, {
+          ref: 'refs/heads/alsonotthebranchname',
+        }],
+      }));
+      const exists = await github.branchExists('thebranchname');
+      expect(ghGot.mock.calls).toMatchSnapshot();
+      expect(exists).toBe(false);
+    });
     it('should return false if a non-200 response is returned', async () => {
       await initRepo('some/repo', 'token');
       ghGot.mockImplementationOnce(() => ({
@@ -439,6 +482,9 @@ describe('api/github', () => {
       // branchExists
       ghGot.mockImplementationOnce(() => ({
         statusCode: 200,
+        body: {
+          ref: 'refs/heads/package.json',
+        },
       }));
       const files = [{
         name: 'package.json',