Fork and Clone Fire App Builder, then Add a Remote

Downloading files from GitHub is easy, but suppose you want to properly set up a Git repository to pull updates from the Fire App Builder repo when those updates become available. If so, you'll need to fork and clone the repo, and then add the Fire App Builder repo as a remote that you can pull from.

Fork and Clone Fire App Builder, then Add the Fire App Builder as a Remote

If you're on Windows, before you clone the Fire App Builder repository, make sure that in your git settings, you have symbolic linking set as true. Otherwise, if you clone the repo without git's symbolic linking configured to true, Fire App Builder won't build. To enable symlinks:

Check whether you have admin privileges on your computer (by going to Start > Control Panel > User Accounts > Manage User Accounts). If you don't have admin privileges, it's okay. You can run a later script to fix any issues.

If you do have admin privileges, open your command line terminal as an administrator and run the following to configure git to allow symlinks:

git config -–global core.symlinks true

When you run this command, git config will be set to enable symlinks. All Linux symlinks will be converted to Windows symlinks during git clone.

Click Fork in the upper-right corner and (if prompted) select the GitHub account you want the repo forked to. Forking a repo creates a copy of the repo in your own GitHub account. The path to your forked repo will be github.com/<your github username>/fire-app-builder.

Click Clone or Download, and then copy the clone URL.

Open your command line and browse to a convenient directory for the project.

Clone the project with the git clone command, replacing <your github username> with your actual username if you forked the repo:

If there are changes, you'll see the changed files listed in the response. You will see merge conflicts for any files with the same name in the amazon/fire-app-builder that you've customized in your own repo. (For example, you'll see conflicts with navigator.json if you've modified this file.)

If changes in the original repository's files conflict with changes you've made to your local copy, git will not automatically overwrite your local copies with the updates. Instead, git will show you merge conflicts for the affected files and remove the affected files from its tracking. You need to resolve the merge conflicts, add the files back into git tracking, and commit your update.

When you see merge conflicts, run git status to see a list of the problematic files. Open the files and look for the carrots (>>>>>> and <<<<<<) indicating areas of conflict. Manually edit the files to remove the carrots, selecting the changes you want to keep and deleting those you want to discard. Then add the file back into git tracking with git add ..

When you're finished resolving conflicts, build your app to make sure everything works. Then push the changes into your own GitHub repo.

Tip: To stay updated with changes the Amazon team pushes out, to Fire App Builder, click Watch in the upper-right corner of the Fire App Builder git repo. Click the star button to see the updates in your GitHub activity feed. When the Fire App Builder pushes out a new commit, you'll receive an email notification.

Getting Updates

When Amazon pushes out updates to Fire App Builder, you'll want to pull these updates into your own repo. You can do this by adding a remote to your existing GitHub repo. To add the remote: