Skip to content

Synchronizing with Google's Repository

Aboubakar Mountapmbeme edited this page Oct 3, 2019 · 4 revisions

Synchronizing this repository with the Google’s repository (upstream).

Note: Before the first synchronization, the directory was restructured to match that of Google’s repository by removing the closure-library folder from our repository.

In order to stay up to date with Google’s repository, we should synchronize at least once a month, provided there are new commits from upstream.

Synchronization should be done locally to make sure everything works fine before pushing to GitHub. First, set-up your local repository to pull changes from Google’s repository (upstream)

git remote add upstream https://github.com/google/blockly.git

From your local repository, fetch updates from the newly configured upstream Merge your local branch with upstream/master Resolve any conflicts that my result. Test to make sure the system works correctly with the new updates. Push your changes to GitHub. For details about how to synchronize a GitHub repository, follow this link The above steps should work normally. However, if there are a lot of updates you might get too many merge conflicts even in files that you did not edit and it will be difficult to resolve.

Alternative method

In that case, the easiest way is to reset the local repository to the upstream version. Before doing this, you should copy all accessibleblockly folders (./accessibleblockly and ./accessiblilitydocuments). Also copy accessibleblocky changes in blockly_uncompressed.js, code for mutator blocks in blocks/logic.js, blocks/procedures.js and core/variables.js, core/block.js . All accessibleblockly code in these files are preceded by the comment > //>>> accessibleblockly. Then reset your local branch to upstream/master

git fetch upstream

git reset --hard upstream/master

After resetting to upstream. Add back all accessibleblockly folders and code in their respective locations. Test to make sure everything is working as expected. Push the newly updated repository to Github.