forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 149
Move FB version merge documentation to the repo it's used in #208
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
# 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 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 | ||
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. <em>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.</em> | ||
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. | ||
HeyImChris marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* 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-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). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.