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

Closed
opened 2025-11-02 08:38:39 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @wolftune on GitHub (Aug 20, 2022).

Feature Description

As appears to have been requested in https://github.com/go-gitea/gitea/issues/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.

Originally created by @wolftune on GitHub (Aug 20, 2022). ### Feature Description As appears to have been requested in https://github.com/go-gitea/gitea/issues/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.
GiteaMirror added the type/proposaltype/feature labels 2025-11-02 08:38:39 -06:00
Author
Owner

@splitt3r commented on GitHub (Aug 21, 2022):

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.

@splitt3r commented on GitHub (Aug 21, 2022): 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.
Author
Owner

@kousu commented on GitHub (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.

@kousu commented on GitHub (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](https://user-images.githubusercontent.com/987487/207180223-0f0621af-dba8-4dff-ad1d-a2bf29c6bc3f.png) and my fork: ![Screenshot 2022-12-12 at 18-15-39 spine-generic-single](https://user-images.githubusercontent.com/987487/207180463-b2dbe701-6ad5-4c24-a637-4118de59beff.png) If I click this on my fork ![Screenshot 2022-12-12 at 18-16-07 spine-generic-single](https://user-images.githubusercontent.com/987487/207180488-e230efa4-f489-4590-a49a-0a9dbdf9875a.png) I get this prompt and have to swap the source and target branches ![Screenshot 2022-12-12 at 18-16-31 spine-generic-single](https://user-images.githubusercontent.com/987487/207180504-c42d96d1-c002-451a-84b3-cf66c2397947.png) Alternately, I can click the New PR button on the PRs page: ![Screenshot 2022-12-12 at 18-17-19 spine-generic-single](https://user-images.githubusercontent.com/987487/207180507-df9e6f1d-1cec-460f-bc28-b9b33c5c8c7b.png) 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](https://user-images.githubusercontent.com/987487/207180510-fae7832d-9a32-4385-b99d-df5c7b93bd75.png) and I can submit it as a PR. --- But again, it took me an embarrassingly long time to figure this out. I :+1: for having a single-click button for the extremely common case of syncing with upstream.
Author
Owner

@wolftune commented on GitHub (Dec 13, 2022):

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.

@wolftune commented on GitHub (Dec 13, 2022): 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.
Author
Owner

@jnahmias commented on GitHub (Jun 7, 2023):

This is what it looks like in GitHub:
image

@jnahmias commented on GitHub (Jun 7, 2023): This is what it looks like in GitHub: ![image](https://github.com/go-gitea/gitea/assets/1028103/ee98ddfa-e908-4e93-92b9-a102ae38687e)
Author
Owner

@jfirwin commented on GitHub (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 https://github.com/go-gitea/gitea/issues/24585, looks like it's time to update gitea

@jfirwin commented on GitHub (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 https://github.com/go-gitea/gitea/issues/24585, looks like it's time to update gitea
Author
Owner

@wnm210 commented on GitHub (Nov 17, 2023):

Single-click button when

@wnm210 commented on GitHub (Nov 17, 2023): Single-click button when
Author
Owner

@alfred-liu96 commented on GitHub (Aug 6, 2024):

This is what it looks like in GitHub: image

hope gitea can have the same function

@alfred-liu96 commented on GitHub (Aug 6, 2024): > This is what it looks like in GitHub: ![image](https://private-user-images.githubusercontent.com/1028103/244176763-ee98ddfa-e908-4e93-92b9-a102ae38687e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI5NDgzNzQsIm5iZiI6MTcyMjk0ODA3NCwicGF0aCI6Ii8xMDI4MTAzLzI0NDE3Njc2My1lZTk4ZGRmYS1lOTA4LTRlOTMtOTJiOS1hMTAyYWUzODY4N2UucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MDZUMTI0MTE0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODNlZDNiMTM1NDE1MmMxM2UwNzczODk1NWJjMDkwOTY5NzJhMWQ4NTFlNDMwYzZmZmI4NjU4MzMyZTBmZDQ1OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.60SutOB26r-BiP6cVREgzvMwclg3y_V82HXOU1usoy4) hope gitea can have the same function
Author
Owner

@vtolstov commented on GitHub (Dec 6, 2024):

this will be very useful to have

@vtolstov commented on GitHub (Dec 6, 2024): this will be very useful to have
Author
Owner

@wxiaoguang commented on GitHub (Dec 6, 2024):

OK, then we will have it in 1.23

@wxiaoguang commented on GitHub (Dec 6, 2024): OK, then we will have it in 1.23
Author
Owner

@wxiaoguang commented on GitHub (Dec 6, 2024):

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

@wxiaoguang commented on GitHub (Dec 6, 2024): Now here it is: Support "merge upstream branch" (Sync fork) #32741 , it catches up the 1.23 release milestone.
Author
Owner

@lunny commented on GitHub (Dec 6, 2024):

Resolved by #32741

@lunny commented on GitHub (Dec 6, 2024): Resolved by #32741
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9434