From e46cf59e3f7596891909214870d77dcf5499487a Mon Sep 17 00:00:00 2001 From: Christopher Hogan Date: Thu, 19 Dec 2019 14:10:10 -0800 Subject: [PATCH 1/2] move FB merge documetation from an esoteric Onenote page to the repo where it belongs and can be accessed by anyone --- KeepingRecent.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 KeepingRecent.md diff --git a/KeepingRecent.md b/KeepingRecent.md new file mode 100644 index 00000000000000..f31d82ae28e4fb --- /dev/null +++ b/KeepingRecent.md @@ -0,0 +1,41 @@ + +# Keeping Recent on Facebook's Changes + +We aim to keep this forked repository as up to date as possible with [Facebook's repository](https://github.com/facebook/react-native). This document explains guidelines and responsibilities for pulling in the newest changes. + +## Merging a New Version of React Native +1. Create a reference to a remote to Facebook's repo +1.1. In terminal: `git remote add facebook https://github.com/facebook/react-native.git` +1.2. In terminal: `cd react-native/; git pull facebook` +2. Create a branch to work in. Below is for merging in Facebook's React Native 0.58 version. +2.1. In terminal: e.g. `git branch fb58merge` +2.2. In terminal: e.g. `git checkout fb58merge` +3. Pull the fb contents at the merge point we want. A list of their most recent versions can be found [here](https://facebook.github.io/react-native/versions). +3.1. In terminal: e.g. `git fetch facebook v0.58.6` +4. Do the merge at the point we want, in this example it's the last version tag of their 0.58 build. Use the name you used in 3.1 here. +4.1. In terminal: e.g. `git merge v0.58.6` + +## Integration Guidelines +It's likely you'll want to push the initial merge up to github **with** the merge conflicts. This makes it easier for other people to see where the errors are and help fix their platforms quickly. + +1. Commit all the changes (conflicts and all). There are many resources to do this such as the [Visual Studio Code](https://code.visualstudio.com/) UI or command line. +2. After you've committed all the changes, push your merge up. +2.1. In terminal: `git push`. This should fail to push, but print out a suggested `git push [more repo specifics here]` command. +2.2. Copy and run that suggested push command which has the proper upstream repo specified. + +#### First Time Merging? Read Below. Otherwise this shouldn't apply to you. +3. The first time doing this, terminal may ask for your github credentials after running the `git push` command from 2.2. You'll need to provide your github username and a 2-Factor-Authentication token password. If you don't have this yet, see substeps below. Github doesn't distinguish when you need to use your github password vs. this 2FA token, but for command line github interactions, you'll need to use the token. +3.1. Generate your personal access token [here](https://github.com/settings/tokens) +3.2. More details [here](https://stackoverflow.com/questions/29297154/github-invalid-username-or-password) + +## Best Practices +* Before pulling in a new React-Native version, verify with platform owners that they're ready to work on the merge. + * Why? + * This prevents merges from getting stuck in limbo where some platforms aren't done for multiple months and in the meantime we have to maintain two working branches. Faster we merge from start to finish, the exponentially less pain we incur. + * Platform owners + * Win32- acoates + * Android- acoates + * iOS- chrishog/tomun + * Mac- chrishog/tomun +* Make sure you're pulling in a **stable** [release candidate](https://facebook.github.io/react-native/versions). +* Note that this *only* gets the newest RN version into [our fork](http://github.com/microsoft/react-native) which will then have to get pushed into downstream repositories such as [SDX-Platform](https://office.visualstudio.com/ISS/_git/sdx-platform) for its consumption. Because we have quite a few code changes in our fork, but not Facebook's master, you should expect some more changes to both downstream clients and [our fork](http://github.com/microsoft/react-native) to keep everything in working order. \ No newline at end of file From ed810dcca975dd0f58cfee76edd8d635f9bba1e2 Mon Sep 17 00:00:00 2001 From: Christopher Hogan Date: Fri, 20 Dec 2019 10:42:50 -0800 Subject: [PATCH 2/2] update aliases and long term goals of deforking --- KeepingRecent.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/KeepingRecent.md b/KeepingRecent.md index f31d82ae28e4fb..bb8c6540e2ffe1 100644 --- a/KeepingRecent.md +++ b/KeepingRecent.md @@ -1,7 +1,7 @@ # Keeping Recent on Facebook's Changes -We aim to keep this forked repository as up to date as possible with [Facebook's repository](https://github.com/facebook/react-native). This document explains guidelines and responsibilities for pulling in the newest changes. +We aim to keep this forked repository as up to date as possible with [Facebook's repository](https://github.com/facebook/react-native). This document explains guidelines and responsibilities for pulling in the newest changes with the eventual goal of pushing all our changes back to Facebook and the React-Native-Community repos and deforking. ## Merging a New Version of React Native 1. Create a reference to a remote to Facebook's repo @@ -33,9 +33,8 @@ It's likely you'll want to push the initial merge up to github **with** the merg * Why? * This prevents merges from getting stuck in limbo where some platforms aren't done for multiple months and in the meantime we have to maintain two working branches. Faster we merge from start to finish, the exponentially less pain we incur. * Platform owners - * Win32- acoates - * Android- acoates - * iOS- chrishog/tomun - * Mac- chrishog/tomun -* Make sure you're pulling in a **stable** [release candidate](https://facebook.github.io/react-native/versions). -* Note that this *only* gets the newest RN version into [our fork](http://github.com/microsoft/react-native) which will then have to get pushed into downstream repositories such as [SDX-Platform](https://office.visualstudio.com/ISS/_git/sdx-platform) for its consumption. Because we have quite a few code changes in our fork, but not Facebook's master, you should expect some more changes to both downstream clients and [our fork](http://github.com/microsoft/react-native) to keep everything in working order. \ No newline at end of file + * Win32- acoates-ms + * Android- acoates-ms + * iOS- HeyImChris/tom-un + * Mac- HeyImChris/tom-un +* Make sure you're pulling in a **stable** [release candidate](https://facebook.github.io/react-native/versions). \ No newline at end of file