mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
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
This commit is contained in:
parent
20a53ba7be
commit
bb15977e39
1 changed files with 6 additions and 1 deletions
|
@ -271,7 +271,12 @@ class Storage {
|
||||||
}
|
}
|
||||||
await git.add(files.map(f => f.name));
|
await git.add(files.map(f => f.name));
|
||||||
await git.commit(message);
|
await git.commit(message);
|
||||||
await git.push(['origin', branchName, '--force']);
|
await git.push([
|
||||||
|
'origin',
|
||||||
|
`${branchName}:${branchName}`,
|
||||||
|
'--force',
|
||||||
|
'-u',
|
||||||
|
]);
|
||||||
} catch (err) /* istanbul ignore next */ {
|
} catch (err) /* istanbul ignore next */ {
|
||||||
logger.debug({ err }, 'Error commiting files');
|
logger.debug({ err }, 'Error commiting files');
|
||||||
if (err.message.includes('[remote rejected]')) {
|
if (err.message.includes('[remote rejected]')) {
|
||||||
|
|
Loading…
Reference in a new issue