Skip to content

Updating JWT library

Philippe Signoret edited this page Jul 25, 2016 · 1 revision

Add the remote for firebase/php-jwt, and create a branch off of firebase/php-jwt/master:

$ git remote add firebase/php-jwt https://github.com/firebase/php-jwt.git
$ git fetch firebase/php-jwt
$ git checkout -b firebase/php-jwt firebase/php-jwt/master 

Note: This creates a branch named "firebase/php-jwt" and a remote named "firebase/php-jwt", which is a bit confusing.

Add the subtree with:

$ git subtree add --prefix lib/php-jwt/ firebase/php-jwt master --squash

After that, one should be able to update it at any time with:

$ git checkout -b update-php-jwt
$ git subtree pull --prefix lib/php-jwt/ firebase/php-jwt master --squash

But that doesn't always work, so you can instead try:

$ rm -rf lib/php-jwt
$ git subtree add --prefix lib/php-jwt/ firebase/php-jwt master --squash

Push this branch to GitHub:

$ git push -u origin update-php-jwt

Start a new pull request. @psignoret will merge the pull request with a squash merge to keep things clean.

The end result should be a single commit with the updated library and the updated plugin.

Clone this wiki locally