Resolve pull request via hard reset #11345

Open
opened 2025-11-02 09:34:55 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @wtodd1 on GitHub (Jul 26, 2023).

Feature Description

It would be nice if you could resolve pull requests by making the target branch point to the last commit of the source branch. This would enable code review in situations that would normally require a force push.

For example, bringing a dev branch up to date with master via rebase would normally require a force push to the dev branch, which as far as I can tell, cannot be reviewed using a normal pull request. With my proposed feature, you could make a new branch called dev-latest with the appropriate changes from master, then make a pull request from dev-latest into dev, and resolve it in such a way that, once closed, dev points directly to the last commit of dev-latest, retaining the exact history of dev-latest.

Screenshots

No response

Originally created by @wtodd1 on GitHub (Jul 26, 2023). ### Feature Description It would be nice if you could resolve pull requests by making the target branch point to the last commit of the source branch. This would enable code review in situations that would normally require a force push. For example, bringing a `dev` branch up to date with `master` via rebase would normally require a force push to the `dev` branch, which as far as I can tell, cannot be reviewed using a normal pull request. With my proposed feature, you could make a new branch called `dev-latest` with the appropriate changes from master, then make a pull request from `dev-latest` into `dev`, and resolve it in such a way that, once closed, `dev` points directly to the last commit of `dev-latest`, retaining the exact history of `dev-latest`. ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 09:34:55 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jul 27, 2023):

I think you can delete the old dev branch and create a new one from the main branch. It's easier than creating a PR with various options.

@wxiaoguang commented on GitHub (Jul 27, 2023): I think you can delete the old dev branch and create a new one from the main branch. It's easier than creating a PR with various options.
Author
Owner

@wtodd1 commented on GitHub (Jul 27, 2023):

I think you can delete the old dev branch and create a new one from the main branch. It's easier than creating a PR with various options.

Sorry, maybe my example wasn't very clear. Suppose I want to keep the dev branch around. It has changes that haven't made it into master yet, but master also has changes that haven't made it into dev yet. I want to resolve this using rebase to keep a clean commit history. I would do this normally by rebasing dev onto master, then force pushing the result to dev. However I would like to do this as a pull request so it can be reviewed first.

I know this is already possible with plain git, but would like to do it through Gitea instead so there is a record of someone reviewing the change first. I think my proposal would support this use case, as well as any other that would normally require a force push.

@wtodd1 commented on GitHub (Jul 27, 2023): > I think you can delete the old dev branch and create a new one from the main branch. It's easier than creating a PR with various options. Sorry, maybe my example wasn't very clear. Suppose I want to keep the dev branch around. It has changes that haven't made it into master yet, but master also has changes that haven't made it into dev yet. I want to resolve this using rebase to keep a clean commit history. I would do this normally by rebasing dev onto master, then force pushing the result to dev. However I would like to do this as a pull request so it can be reviewed first. I know this is already possible with plain git, but would like to do it through Gitea instead so there is a record of someone reviewing the change first. I think my proposal would support this use case, as well as any other that would normally require a force push.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11345