Here we describe the procedure to sync this fairchat.ReactNative repo on your machine with the upstream/master branch of the Rocket.Chat.ReactNative project.
The Rocket.Chat.ReactNative upstream/master is the
develop branch (you have that also locally in your git). It may be merged with the fairchat.ReactNative develop branch, which is
developFairchat. Or define a new branch for it like "mergeWith1.2n.x'.
Sync from the RC upstream master to your local git
Change the current working directory to your local fairchat.ReactNative project.
Fetch the branches and their respective commits from the upstream repository. Commits to master will be stored in a local branch, upstream/master.
$ git fetch upstream
remote: Counting objects: 75, done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 62 (delta 27), reused 44 (delta 9)
Unpacking objects: 100% (62/62), done.
From https://github.com/RocketChat/Rocket.Chat.ReactNative/> * [new branch] master -> upstream/master
If upstream is not available yet, add it:
git remote add upstream https://github.com/RocketChat/Rocket.Chat.ReactNative
Check out your fork's local master branch.
$ git checkout developFairchat
Merge the changes from upstream/master into your local master branch. This brings your fork's master branch into sync with the upstream repository, without losing your local changes.
$ git merge upstream/master
README | 9 -------
README.md | 7 ++++++
2 files changed, 7 insertions(+), 9 deletions(-)
delete mode 100644 README
create mode 100644 README.md
If your local branch didn't have any unique commits, Git will instead perform a "fast-forward":
Push changes to the fairchat.ReactNative repo
git push --set-upstream origin developRC
In the developRC branch we will have now an exact copy of the RC develop branch.
In order to start merge into your working branch
git push --set-upstream origin developFairchat
or create a branch
mergeWith1.2n.x to merge into
Source: Syncing a fork
(not recommended, as it loops with a lot of merge proposals)
Instead of merging, we may want to rebase so that we have a new master with all features.
git checkout fairchat-master
git rebase upstream/master
Now you solve the merge conflicts e.g. using
Build the app.
If everything is fine, then you might push it. Only do so, when nobody else has been working on the fairchatRN, as master is shifted! Be very careful with this command!
git push --force
Publish in repo
If you want to update the develop branch from upstream in https://git.fairkom.net/chat/fairchat.ReactNative/tree/develop then you do a
git checkout upstream/develop
git push origin HEAD:develop
Start over in a nutshell
Rename developFairchat to developFairchat2.0.1 and create a new empty one with the actual developRC code:
git checkout developRC git fetch upstream git checkout developFairchat git push origin --rename developFairchat2.0.1 git push origin -u developFairchat2.0.1 git checkout -b developFairchat git push --set-upstream origin developFairchat
then cherry pick each commit from developFairchat2.0.1 to the developFairchat repo
// android launch screen in all resolutions git cherry-pick 6acc21e4 // replace in all resolutions logo git cherry-pick afe7107 ---