Skip to content

Commit c8351dd

Browse files
abadgerMariatta
authored andcommitted
Explicit push location to ignore user git config (#264)
Users can configure what strategy "git push" uses to determine which remote branch it should push to. Cherry-picker doesn't work with all of the git push strategies but we can make explicit what the remote branch should be which works around that problem.
1 parent 9501f76 commit c8351dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cherry_picker/cherry_picker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def amend_commit_message(self, cherry_pick_branch):
202202
def push_to_remote(self, base_branch, head_branch, commit_message=""):
203203
""" git push <origin> <branchname> """
204204

205-
cmd = ['git', 'push', self.pr_remote, head_branch]
205+
cmd = ['git', 'push', self.pr_remote, f'{head_branch}:{head_branch}']
206206
try:
207207
self.run_cmd(cmd)
208208
except subprocess.CalledProcessError:

0 commit comments

Comments
 (0)