Update how to sync repos authored by Roland Alton's avatar Roland Alton
...@@ -20,6 +20,8 @@ Check out your fork's local master branch. ...@@ -20,6 +20,8 @@ Check out your fork's local master branch.
$ git checkout master $ git checkout master
> Switched to branch 'master' > Switched to branch 'master'
## Option merge
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. 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 $ git merge upstream/master
...@@ -38,3 +40,17 @@ Push changes to the fairchat.ReactNative repo. ...@@ -38,3 +40,17 @@ Push changes to the fairchat.ReactNative repo.
> git push > git push
Source: [Syncing a fork](https://help.github.com/en/articles/syncing-a-fork) Source: [Syncing a fork](https://help.github.com/en/articles/syncing-a-fork)
## Option rebase
Instead of merging, we may want to rebase so that we have a new master with all features.
> git checkout master
> git rebase upstream/master
If everything was 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
Source: https://www.atlassian.com/de/git/tutorials/merging-vs-rebasing
\ No newline at end of file