diff --git a/dist/index.js b/dist/index.js index 7d704f067..df98b37f8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -132,6 +132,8 @@ function createOrUpdateBranch(git, commitMessage, base, branch, branchRemoteName params.push('--signoff'); } yield git.commit(params); + git.exec(['reset', '--hard']); + git.exec(['clean', '-f']); } // Perform fetch and reset the working base // Commits made during the workflow will be removed diff --git a/src/create-or-update-branch.ts b/src/create-or-update-branch.ts index 7c2a3ac07..9031a13eb 100644 --- a/src/create-or-update-branch.ts +++ b/src/create-or-update-branch.ts @@ -129,6 +129,8 @@ export async function createOrUpdateBranch( params.push('--signoff') } await git.commit(params) + git.exec(['reset', '--hard']) + git.exec(['clean', '-f']) } // Perform fetch and reset the working base