Get #Amazon #Prime for this #holiday #amazonprime #christmas #2019

How to #git sync from a repo that you have forked?

You might see the following error when you try to sync from the original repo that you have forked using git fetch upstream. The reason for this is the git repository doesn't have upstream configured.

git fetch upstream                    aws-serverless-express: master  9:19pm
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

If you run git remote -v command, you will see something like the following:

git remote -v                         aws-serverless-express: master  9:20pm

Steps to configure an upstream:

1)
You can follow the steps on how to configure a remote upstream for a fork on this GitHub document:


After you add an upstream, you will see upstream paths set up. Note that you only have to configured the git repo upstream once. 

git remote -v                                        example: master  9:21pm

2)
With that set up, you can use git fetch upstream to sync your local repo with the remote original repo.

git fetch upstream                    aws-serverless-express: master  9:21pm
remote: Counting objects: 163, done.
remote: Compressing objects: 100% (69/69), done.
remote: Total 163 (delta 94), reused 93 (delta 63), pack-reused 31
Receiving objects: 100% (163/163), 142.92 KiB | 728.00 KiB/s, done.
Resolving deltas: 100% (99/99), completed with 17 local objects.
* [new branch]      content-length-fix -> upstream/content-length-fix
* [new branch]      develop            -> upstream/develop
* [new branch]      master             -> upstream/master
* [new tag]         v3.3.5             -> v3.3.5
* [new tag]         v3.3.0             -> v3.3.0
* [new tag]         v3.3.1             -> v3.3.1
* [new tag]         v3.3.2             -> v3.3.2
* [new tag]         v3.3.3             -> v3.3.3
* [new tag]         v3.3.4             -> v3.3.4

3)
Then, you can do a merge to include the update to your local repo.
git merge upstream/master                            example: master  9:22pm
Updating 42a5501..5f61b40
Fast-forward
.eslintrc.js                                       |    9 +
.github/PULL_REQUEST_TEMPLATE.md                   |    3 +-
.gitignore                                         |    3 +-
.jshintrc                                          |   11 -
.travis.yml                                        |   16 +-
CHANGELOG.md                                       |   32 +
CONTRIBUTING.md                                    |   24 +-
README.md                                          |    2 +-
__tests__/index.js                                 |  241 -
__tests__/integration.js                           |  469 ++
__tests__/middleware.js                            |   81 +-
__tests__/unit.js                                  |  335 +
example/scripts/configure.js                       |   65 -
example/scripts/deconfigure.js                     |   20 -
example/vanilla-server.js                          |   21 -
{example => examples/basic-starter}/.gitignore     |    0
{example => examples/basic-starter}/README.md      |    4 +-
.../basic-starter}/api-gateway-event.json          |    0
{example => examples/basic-starter}/app.js         |   40 +-
......

With that, your repo will be updated with the changes included in the original repo.

Thanks for reading!
Jun