Skip to content

Commit fa38655

Browse files
committed
add refs/heads/ prefix to push commands
1 parent cb476ca commit fa38655

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)