GitHub: keep one branch up to date with another

e.g. if you have to release a hotfix to your production branch, you can use this sketch will automatically merge that back to your main development branch (or raise a PR if that isn't possible)

If all your development takes place into once main Development Branch (dev or master are common names for this branch); and then to ship you merge to another branch (e.g. devmaster or masterproduction respectively) then this sketch will help you keep your Development Branch up to date with the hotfixes you've had to ship straight to production.

It will attempt to merge your Hotfix Branch into your Development Branch; if it fails then it will open a pull request for you to review/fix.

You can also use this where you have a feature branch (Development Branch) that contains breaking changes for the next major release (v2.0.0), but you're still releasing bugfixes to the current release (v1.9.374) via development on the master branch (Hotfix Branch).