Skip to content
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

Single-action web UI for a fork to fast-forward pull from origin (Sync fork) #20880

Closed
wolftune opened this issue Aug 20, 2022 · 11 comments
Closed
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@wolftune
Copy link

wolftune commented Aug 20, 2022

Feature Description

As appears to have been requested in #2488 but never achieved… This is what should be doable more easily:

  • User creates fork
  • User wants to get their unchanged main branch of their fork to match current origin main branch (i.e. the same as if they forked anew)

Imagine a web-ui user (e.g. a contributor who is helping with docs and is not comfortable with Git or CLI etc) who only makes changes on branches of their fork, keeping their main branch locked to the origin's main.

Right now, these several-too-many steps are required for those using the web ui:

  • At fork, click "New Pull Request"
  • Click the little side-symbol to "Switch head and base"
  • Click "New Pull Request"
  • Scroll down and click "Create Pull Request"
  • Use the drop-down to choose "Rebase then fast-forward"
  • Click "Rebase then fast-forward" (to set that method actually)
  • Click "Rebase then fast-forward" (to actually do it)
  • Click <code> or the fork title to return to the overview of the fork

That's a lot of steps for what could easily be a single button "fast-forward to latest origin" which could show up whenever origin is ahead of the fork, and it would pull with --ff-only and just stay right on the main fork view.

For those comfortable with Git, they might skip the Web UI anyway. For those not comfortable, this Web UI process is almost hostile. Without the button I'm requesting, there's no way to easily onboard the sort of contributor who is most comfortable with web UI and have simple instructions about how to use the Web UI to make a fork and keep its main branch updated.

@wolftune wolftune added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Aug 20, 2022
@splitt3r
Copy link
Contributor

GitHub already has this function and it's pretty neat. Ref https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork.

@kousu
Copy link
Contributor

kousu commented Dec 12, 2022

#2488 seems to have been satisfied with using PRs for this.

It took me a bit to figure that workflow out, but it is working for me:

Here's my upstream:

Screenshot 2022-12-12 at 18-15-52 spine-generic-single

and my fork:

Screenshot 2022-12-12 at 18-15-39 spine-generic-single

If I click this on my fork

Screenshot 2022-12-12 at 18-16-07 spine-generic-single

I get this prompt and have to swap the source and target branches

Screenshot 2022-12-12 at 18-16-31 spine-generic-single

Alternately, I can click the New PR button on the PRs page:

Screenshot 2022-12-12 at 18-17-19 spine-generic-single

and then choose the upstream branch

In either case, I get to this page, with the diff shown:

Screenshot 2022-12-12 at 18-17-42 spine-generic-single

and I can submit it as a PR.


But again, it took me an embarrassingly long time to figure this out. I 👍 for having a single-click button for the extremely common case of syncing with upstream.

@wolftune
Copy link
Author

Thanks for documenting the workaround. It needs also the specific step of making sure to then switch to the fast-forward style of merging. Room for error and quite a hassle, so definitely not ideal. But workarounds are better than nothing. Definitely a sync-with-upstream button is the way to go.

@jnahmias
Copy link

jnahmias commented Jun 7, 2023

This is what it looks like in GitHub:
image

@jfirwin
Copy link

jfirwin commented Sep 13, 2023

Any idea why my fork wouldn't be showing the upstream branch? So far I've had to manage it with the command line and I'd love to be able to do this using @kousu workaround (eventually a single click button would be ideal).

Edit: The upstream is a Github Mirror, if that changes anything.
Edit 2: I was able to find the upstream branch by manually inputting the URL as was suggested in this issue #24585, looks like it's time to update gitea

@wnm210
Copy link

wnm210 commented Nov 17, 2023

Single-click button when

@alfred-liu96
Copy link

This is what it looks like in GitHub: image

hope gitea can have the same function

@wolftune wolftune mentioned this issue Nov 26, 2024
@wxiaoguang wxiaoguang changed the title Single-action web UI for a fork to fast-forward pull from origin Single-action web UI for a fork to fast-forward pull from origin (Sync fork) Dec 5, 2024
@vtolstov
Copy link

vtolstov commented Dec 6, 2024

this will be very useful to have

@wxiaoguang
Copy link
Contributor

OK, then we will have it in 1.23

@wxiaoguang wxiaoguang added this to the 1.23.0 milestone Dec 6, 2024
@wxiaoguang
Copy link
Contributor

Now here it is: Support "merge upstream branch" (Sync fork) #32741 , it catches up the 1.23 release milestone.

@lunny
Copy link
Member

lunny commented Dec 6, 2024

Resolved by #32741

@lunny lunny closed this as completed Dec 6, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Mar 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

10 participants