How to update a fork on Github to upstream version without pumping everything though my local computer?
- Forked a 100 MB repository;
- Added just one little commit to it;
- After month, the upstream repositlry got a lot of commits and now 200 MB;
- Now I want to update my forked repository.
I see two ways of doing it:
- Just push the updated version like usual. Drawback: it uploads 100 MB to network. Inefficient.
- Delete the forked repository entirely and re-fork it, then upload the changes. Drawback: hassle to set up things.
How to do it efficiently?
One Solution collect form web for “How to update a fork on Github to upstream version without pumping everything though my local computer?”
Despite I’m yet to see a repository that grows that fast1 I’ll try to answer:
- Method two will have a much larger impact on network as you’ll have to re
clonethe entire repository.
- There was similar question a few days before: It is possible to do a merge via GitHubs Web interface by creating a reverse pull request, but this will create additional merge commits and you still have to download those 100 MB.
- In case you have access to a server via a greater bandwidth: Perform the update on that machine, it will go faster, but you still have to download those 100 MB.
In short: Simply go for your first point, it is the most straight forward one.
1 My last clone of the entire history of the linux kernel is sized 900 MB.