From b66ed9add0a175426c6565e64d21a26e5d7e7490 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Sun, 24 Feb 2019 08:39:44 +0100
Subject: [PATCH] fix(gitFs): clean before changing branch

---
 lib/platform/git/storage.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/platform/git/storage.js b/lib/platform/git/storage.js
index 7c025fea82..a0ba6bae82 100644
--- a/lib/platform/git/storage.js
+++ b/lib/platform/git/storage.js
@@ -265,6 +265,7 @@ class Storage {
     ) {
       try {
         await git.reset('hard');
+        await git.raw(['clean', '-fd']);
         await git.checkout(['-B', branchName, 'origin/' + parentBranch]);
         for (const file of files) {
           await fs.writeFile(join(cwd, file.name), Buffer.from(file.contents));
-- 
GitLab