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
Describe how to sync a fork with upstream in Github #155
Comments
Hi David! Not to rain on your parade (> 2 yrs later no less) but this method does not have the @jennybc stamp of approval. See: https://happygitwithr.com/upstream-changes.html#no-you-cant-do-this-via-github-1 I believe the "fatal flaws" are that this method messes up the commit history in a way that matters a lot to people who know a lot more about git than I do. 😄 |
GitHub now has a "Fetch Upstream" action which is what I use these days. Might be worth trying that to see if it preserves the commit history in a suitable way. |
Oh wow, I didn't know about that. So you click "Fetch Upstream" and then pull from your fork (rather than upstream) to stay updated? |
Yes, that's correct -- the upstream changes get merged into your fork (in your GitHub repo), which you can then sync as usual. |
Thanks! |
Good one! I was here to leave the same comment. This new process on Github makes it very easy to keep branches synced with upstream (so long as you follow Happy Git advice and never add your own changes to forked branches!). Would be helpful to update the section mentioned above to include this workflow. |
Thanks all for highlighting that it is now possible to update the fork in the web UI. I have adjusted this part of Happy Git accordingly. |
This process, using only Github's PR process and not requiring the git command line, works:
https://twitter.com/revodavid/status/1187435324353302534
The text was updated successfully, but these errors were encountered: