Packaging code from someone else’s repository

I have forked someone else’s repository GitHub - datapolitical/paprika-exporter: Export recipe data out of Paprika into YAML and now I would like to create a python package to use it in another project.

But I want that package to have the initial repository as an upstream so any changes the author makes can be pulled in. How do I do that?

A common approach would be to keep your packaging work on a separate branch, and merge in upstream changes as needed. Merging might mean resolving conflicts (if you made changes to the code) or adjusting your packaging to upstream changes (or at least checking if any changes are needed), so it’ll be a manual step.

To do that you need to add the upstream repository as a “remote” to your local repository. Then you can fetch, checkout, and merge at will. For the “remote” part see:

Thank you! This is exactly what I was missing.

1 Like