From bb15977e39e1b3960bfee1eddb825157e5e339ef Mon Sep 17 00:00:00 2001 From: Michael Kriese <michael.kriese@visualon.de> Date: Mon, 18 Feb 2019 12:52:10 +0100 Subject: [PATCH] fix(gitFs): set explicit remote branch (#3229) This pr fixes the windows specific git bug by setting the remove branch name explicitly when pushing. Closes #3204 --- lib/platform/git/storage.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/platform/git/storage.js b/lib/platform/git/storage.js index 190c5a30db..7c025fea82 100644 --- a/lib/platform/git/storage.js +++ b/lib/platform/git/storage.js @@ -271,7 +271,12 @@ class Storage { } await git.add(files.map(f => f.name)); await git.commit(message); - await git.push(['origin', branchName, '--force']); + await git.push([ + 'origin', + `${branchName}:${branchName}`, + '--force', + '-u', + ]); } catch (err) /* istanbul ignore next */ { logger.debug({ err }, 'Error commiting files'); if (err.message.includes('[remote rejected]')) { -- GitLab