Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Button to allow us to 'sync'/pull upstream changes for forked repos #121

Closed
0xdevalias opened this issue Nov 13, 2013 · 175 comments
Closed

Button to allow us to 'sync'/pull upstream changes for forked repos #121

0xdevalias opened this issue Nov 13, 2013 · 175 comments
Labels
enhancement forks implemented parity Features that GitHub is missing, but competitors implement; also, see [Migration]

Comments

@0xdevalias
Copy link

Firstly, I know this can be done through git fetch/merge/push (as outlined at Github Help: Syncing a Fork)

I figured this would be a convenient feature given that we can fork/edit/submit pull requests all from the browser these days. But once we've forked something, to keep it up to date we have to drop back to command line/client.

Obviously this would require a bit more effort/engineering in places where a fast-forward merge isn't possible.

My 2c.

(Will be sending this to [email protected] shortly Sent!)

@albertosantini
Copy link

I second @alias1 feature request.

Feature Abstract

It would be nice updating a forked project, pulling the upstream commits to the origin without a terminal or a local git repository.

As (web) workaround, you need to delete the fork and forking again the project.

Use case

Imagine I have not a terminal or I am behind a company proxy (and I am too lazy to set a token or to authorize the company email) or I am using an internet cafe connection.

I have only a browser and I need to submit a PR on a forked project of mine.

Firstly I need to pull the latest commits from the upstream.

Proposal

To add a button close to the list of the branches to pull that branch (only fast forward) from upstream.

(email to GitHub support sent)

@albertosantini
Copy link

From GitHub support:

Thanks for the suggestion. We've had this requested before, so I've added a +1 to this item on our internal Feature Request List. We can't promise if we might add something like this, however your feedback is definitely appreciated.

@mrec
Copy link

mrec commented May 27, 2014

Thirded. It turns out there is a way to do this via the browser UI, as described in this StackOverflow answer. However:

  1. It's monumentally unintuitive.
  2. Merging your own PR shows up as a contribution in your activity history, which makes a bit of a mockery of the whole concept.

What's weird about this missing feature is that GitHub appears to have implemented it at one point back in 2008, and then removed it for reasons unknown. Frustrating.

@Mithgol
Copy link

Mithgol commented May 28, 2014

Wow. Deep magic. Impressive.

@cirosantilli
Copy link
Collaborator

Web API Pull request resolution request: #200

@navarr
Copy link

navarr commented Jan 28, 2015

I just sent support a very similar feature request, included below:


Being able to fork a repository is a massively helpful feature that allows users to help contribute to open source - but an interesting problem, at least for multiple contributions, is how easy it is for their local fork to get out of sync with upstream (provided that they aren't trying to maintain an actual "fork")

So my request/suggestion is a way to sync with upstream's master. There are a couple of ways to solve this, and one or all could theoretically be implemented.

Idea #1: Allow users to fork existing branches as read-only and essentially make them a symlink to the upstream branch. This would encourage more casual contributors to fork the upstream so they may submit pull requests against it's main branches without having to keep their own copy up-to-date.

Idea #2: If a fork of a branch can be fast-forwarded from the parent's same branch, add a "sync" button that does the same thing as a pull request but without the merge commit - as it is silly to --no-ff when you're keeping a branch in sync with upstream.


Since this FR is essentially Idea 2 - should I create a separate issue for idea 1?

@iliaskarim
Copy link

"Fast Forward Your Work" is a crucial feature.

Color me astonished that it don't doesn't already exist on github.

@vorburger
Copy link

+1 ... this would be nice and very useful in some use cases. Tx @mrec for the S.O. tip, useful workaround.

@thread13

This comment has been minimized.

@jawinn
Copy link

jawinn commented Jul 3, 2015

Thirded. It turns out there is a way to do this via the browser UI, as described in this StackOverflow answer. However:
It's monumentally unintuitive.

This.

@michellemay
Copy link

I would add that it is painfull to do this git fetch/merge/push for multiple branches!
We need a "keep my fork in sync with all upstream branches"! I hate having a fork go out of sync and I always end-up deleting my fork and starting over again! This is counter productive for the fork/branch/commit/pullrequest workflow..

@serapath

This comment has been minimized.

@Gazzonyx
Copy link

The worst part of the web workflow is as follows :
Let's pretend I have forked https://github.com/samba-team/samba and I want to update the README with instructions on how to use GitHub to submit patches (Hey! That's exactly the simple task I want to do! What are the chances?).
First I sync up to upstream and then create a branch for this change. Then I make the change and send a pull request. Now my sync commit is part of the pull request that does nothing (because it's all the same) and has nothing to do with the README change. Hooray! Confusion ensues. And so help you when you find out that the online editor wraps differently than the README is displayed in the same space. Now we're just piling on to the pull request.

From my point of view, syncing should be squashed from pull requests when the target is the source of the sync. IE, downstream syncs never get added to upstream pull requests when that upstream was the source of the sync.

@jakirkham
Copy link

It looks like there now is an update branch button. So, this may already be solved.

@albertosantini
Copy link

@jakirkham agreed.

We can close this issue.

@navarr
Copy link

navarr commented Oct 20, 2015

Where is this new button?

@mrec
Copy link

mrec commented Oct 20, 2015

@jakirkham @albertosantini are you sure?

I'm reading https://github.com/blog/2051-protected-branches-and-required-status-checks and I can see an "Update" button in repo Settings/Branches, but that looks to me like it only applies to branches from a master in the same repo, not forks from a remote repo. Am I looking at the wrong thing?

@albertosantini
Copy link

@mrec Yep, you are right. I was confused. There is not a button for the fork. Sorry for the noise.

@jakirkham
Copy link

Must also be confused, I saw PRs and thought that what what we were concerned about here.

@tonybaroneee

This comment has been minimized.

@guillochon
Copy link

+1, BitBucket has this. Do you really want those BitBucket guys to beat you? ;-)

@edwinksl

This comment has been minimized.

1 similar comment
@thetiby

This comment has been minimized.

@McDutchie
Copy link

Another +1 for this feature request. This seems like a pretty basic feature. I just spent half an hour fruitlessly looking for it. I'm rather astonished it's not included in the GUI.

@thetiby
Copy link

thetiby commented Jan 20, 2016

@isaacs if there's a more involved reason for this not being implemented (other than not being a priority), please share it with us, I'm sure that some useful ideas will pop eventually
sorry, I didn't read the repo description; I thought that you were a github dev

@jakirkham
Copy link

I hope everyone that is +1-ing this realizes that they still need to email GitHub support. To quote the README of this repo.

This is not the actual repository for the GitHub website.
...
you should also email [email protected], since this repo is strictly for our own (unofficial) tracking purposes.

@qualidafial
Copy link

Sent to github support:

I'd like to add my voice to the folks on #121

When a branch is behind the upstream project and there are no new commits on the fork, I would very much like to have a button which pulls and fast-forwards the branch to sync it with the upstream project.

The lack of this button adds unnecessary tedium to maintaining forks, particularly when one forks a popular and active project.

Edit: Response from GH support:

Hi Matthew,

Thanks for taking the time to write in with your support for this feature request! I'll make a note of this for the team to consider when making improvements.

Cheers,
Alex

@wkcwells
Copy link

+1. Emailed [email protected].

@juggernate

This comment has been minimized.

@isedwards
Copy link

+1. I've also emailed [email protected]

"We're regularly working with new programers, and for months we've been desperate to find a way to allow them to easily keep their fork in sync with upstream." ...

@clouds56
Copy link

A workaround for people doesn't know, from this answer

  1. go to origin repo, propose a file change (do not send pull request to the origin repo)
  2. you have a branch patch-1 in your repo, make it as default
  3. delete the original master branch in your repo
  4. goto the commit of HEAD~1 in your repo
  5. create a new master branch, and set the new master branch as default
  6. delete the branch patch-1

@jowagner
Copy link

jowagner commented Aug 23, 2019

If I am happy to delete my master branch as in @clouds56's solution and if I have no other active branches, I can just as well delete my repo and fork again, right?

Edit: Deleting a repo asks for typing the repo name and for the account password.

Edit 2: Thanks @clouds56 for indirectly pointing out that one can propose README.md changes by first clicking on README.md in the file list (as opposed to concluding from the absence of an edit button in the landing page that one does not have permission to propose changes).

@BarbzYHOOL
Copy link

the greasyfork script looks awesome

@rockstardev
Copy link

Dammit Github... you would expect this feature is implemented by now. Now instead of people clicking one button and updating their forked repository you'll have everyone resorting to solutions like this:

#121 (comment)

I've installed Pull application from @wei ... hopefully it's safe... let's see if it'll trigger within hour or I'll need to manually trigger.

@BarbzYHOOL

This comment has been minimized.

@rockstardev
Copy link

rockstardev commented Jan 12, 2020

I've got no choice

Update: Autosync on Pull app working after an hour, no need for manual trigger.

@wei
Copy link

wei commented Jan 12, 2020

hopefully it's safe

it's safe as long as you read the README 😬

@thoran
Copy link

thoran commented Jan 19, 2020

+1 Over 6 years! So, shall we spam [email protected]?

@hiqqs

This comment has been minimized.

@hiqqs
Copy link

hiqqs commented Mar 14, 2020

Hi, my previous comment was marked as spam. Is this still being considered and just being simply ignored?

@TPS
Copy link
Collaborator

TPS commented Mar 14, 2020

Hi, my previous comment was marked as spam. Is this still being considered and just being simply ignored?

@johnhiggs Your comment is being ignored as non-constructive. Remember, anything posted here is being sent to 💯s of subscribers, so be considerate.

Also, please carefully comprehend & consider the ReadMe for this repo.

@TPS TPS added the parity Features that GitHub is missing, but competitors implement; also, see [Migration] label Mar 14, 2020
@aman-godara
Copy link

Thirded. It turns out there is a way to do this via the browser UI, as described in this StackOverflow answer. However:

  1. It's monumentally unintuitive.
  2. Merging your own PR shows up as a contribution in your activity history, which makes a bit of a mockery of the whole concept.

What's weird about this missing feature is that GitHub appears to have implemented it at one point back in 2008, and then removed it for reasons unknown. Frustrating.

This helped me a lot Thanks.

@scheib
Copy link

scheib commented Oct 20, 2020

Large forks need these unintuitive workarounds to update because github will reject pushing so much data upstream, and using 'compare' to create a pull request online takes too long.

Case study: https://github.com/chromium/chromium is useful to fork. However, if you don't use and update your own fork for a while it falls too far behind and can't be updated.

  1. Editing a file and starting a pull request on https://github.com/chromium/chromium will quickly update your fork's object storage
  2. You then update your fork's master branch with git push github master:master.
  3. You can delete the unnecessary branch without actually sending your pull request.

@botatoes
Copy link

botatoes commented May 6, 2021

Hi all! We just shipped ability to sync with upstream forks. https://github.blog/changelog/2021-05-06-sync-an-out-of-date-branch-of-a-fork-from-the-web/

We'll be iterating on it based on feedback so please let me know if you all have any feedback.

@TPS TPS added the implemented label May 6, 2021
@TPS TPS closed this as completed May 6, 2021
@TPS
Copy link
Collaborator

TPS commented May 6, 2021

Thanks very much, @botatoes & company.

@ALL Comments/concerns re: the implementation/experience?

@scheib
Copy link

scheib commented May 6, 2021

❤️

That magical moment when you ask for a product to get better... and it gets better. 😄 Worked well out of the box for me.

@lwcorp
Copy link

lwcorp commented May 7, 2021

Worked flawlessly and quickly for me!
Any chance to make it fully automatic (maybe "every X days"?) without needing a button?

@Levi-Lesches
Copy link
Contributor

You can probably have a GitHub action on a cron schedule

@lwcorp
Copy link

lwcorp commented May 7, 2021

Perhaps so, but the great thing about this Issue is the ability to do it straightforward through the web interface.

@mmirate
Copy link

mmirate commented May 8, 2021

Thanks very much, @botatoes & company.

@ALL Comments/concerns re: the implementation/experience?

What's here right now is great for smaller/simpler projects.

What would be better, would be one of these buttons for each entry on the branches list.

@Kgirthofer
Copy link

Is there any thought of bringing this to internal branches as well? I.e. PR that is out of date can be synced up to develop with a similar button

@yjqg6666
Copy link

yjqg6666 commented Jun 4, 2021

@botatoes Awesome feature, long awaited. How to automate this action via Github Action? Any help doc?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement forks implemented parity Features that GitHub is missing, but competitors implement; also, see [Migration]
Projects
None yet
Development

No branches or pull requests