-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Push local branch with --set-upstream #116
Conversation
@@ -51,6 +51,6 @@ def create(self, tone: MessageTone, jira=None, include=None, edit: Optional[int] | |||
|
|||
title = reviewed_message.split("\n")[1] | |||
description = reviewed_message.split(title)[1] | |||
git.push("origin", git_info.branch, force=True) | |||
git.push("origin", git_info.branch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--force
was added so that we can easily override the remote with rebased/amended commits in case of g pr --edit X
or g pr
on an already pushed branch with the same name in github.
We had discussed setting this in the configs too but defaulting to True
would make, again, more sense to me since developers commonly rebase or amend their commits before merging their work to the main branch.
We don't need to disable the force flag to resolve the reported issue, do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap we don't need to. Personally I would rather be asked if something is going to be forced in remote but no strong opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created this issue so that we support that in the context of v1; let's develop them separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
sh.git("push", "--set-upstream", remote, "--force", branch) | ||
else: | ||
sh.git("push", remote, branch) | ||
sh.git("push", "--set-upstream", remote, branch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -51,6 +51,6 @@ def create(self, tone: MessageTone, jira=None, include=None, edit: Optional[int] | |||
|
|||
title = reviewed_message.split("\n")[1] | |||
description = reviewed_message.split(title)[1] | |||
git.push("origin", git_info.branch, force=True) | |||
git.push("origin", git_info.branch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created this issue so that we support that in the context of v1; let's develop them separately.
📝 Description
Resolves #115