Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/stack_pr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ def command_submit(
# If the current branch contains commits from the stack, we will need to
# rebase it in the end since the commits will be modified.
top_branch = st[-1].head
orig_head_commit = st[-1].commit.commit_id()
need_to_rebase_current = is_ancestor(top_branch, current_branch)

# Push local branches to remote
Expand Down Expand Up @@ -878,7 +879,9 @@ def command_submit(
[
"git",
"rebase",
"--onto",
top_branch,
orig_head_commit,
current_branch,
"--committer-date-is-author-date",
]
Expand Down