Skip to content
Snippets Groups Projects
Commit b66ed9ad authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(gitFs): clean before changing branch

parent 0c4cea4b
No related branches found
No related tags found
No related merge requests found
...@@ -265,6 +265,7 @@ class Storage { ...@@ -265,6 +265,7 @@ class Storage {
) { ) {
try { try {
await git.reset('hard'); await git.reset('hard');
await git.raw(['clean', '-fd']);
await git.checkout(['-B', branchName, 'origin/' + parentBranch]); await git.checkout(['-B', branchName, 'origin/' + parentBranch]);
for (const file of files) { for (const file of files) {
await fs.writeFile(join(cwd, file.name), Buffer.from(file.contents)); await fs.writeFile(join(cwd, file.name), Buffer.from(file.contents));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment