Skip to content

Commit a528487

Browse files
authored
Merge pull request #357 from Staffbase/add-refsheads-push-cmd
add refs/heads/ prefix to push commands
2 parents cb476ca + 76b376a commit a528487

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/autodev.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ const autoDev = async (): Promise<void> => {
127127
if (!branchExists) {
128128
info(`Branch ${branch} does not exist. Creating branch from ${base}.`)
129129
await exec(`git checkout -b ${branch} ${base}`)
130-
await exec(`git push -u origin ${branch}`)
130+
await exec(`git push -u origin refs/heads/${branch}`)
131131
}
132132
await exec(`git checkout -B ${branch}`)
133133

134134
// only push to defined branch if there are changes
135135
await exec('git fetch')
136136
if (await hasDiff('HEAD', `origin/${branch}`)) {
137137
// ignore any errors
138-
await exec(`git push -f -u origin ${branch}`, undefined, {
138+
await exec(`git push -f -u origin refs/heads/${branch}`, undefined, {
139139
ignoreReturnCode: true
140140
})
141141
}

0 commit comments

Comments
 (0)